{"_id":"@pkorsholm/medusa-plugin-restock-notification","_rev":"43-f04351b667b1a791c4d561d2dbf57cf8","name":"@pkorsholm/medusa-plugin-restock-notification","dist-tags":{"latest":"1.0.0","staging":"0.0.0-staging-20230113135316","snapshot":"0.0.0-snapshot-20230113135425"},"versions":{"1.0.0":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.0","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"^1.6.1","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-mMAMIYvqv2YspzAqtZuwTmwUZM0XBAp15U8IWo1lO9AJPuVtMTrd4GK5lL2IfuM8RxsBnqcI+wENkYRXQwspbg==","shasum":"42f91b4a46b7371195677900bb5ca67d45cbbd1d","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.0.tgz","fileCount":24,"unpackedSize":62960,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWgqfqzDsLzGUTJ6ILnvck3UIBPp80lROo/VVSRpsLiAiEA684c+abrrGSF6BwzyI3aeu0UGazTi/SdLgvzsKhTPA8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbJ6cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/xRAAkRP0nR/8sVJz7com0YUJ9Wdmsj68zq5OihW3DP1fvs9FzFMJ\r\nm4Bu15uNgo38RoeReRGSa6FjdNZn/D9mIIt/5X/enVc93lKIEaC0zn6QV9nz\r\n7Gd3QdL+FVU5QQ/0/sonR8KdynUAwmrp91ZyndWB32ljYjq12zHP0Vxrh+jK\r\nKaKUn1Y7PVR9nsixm0yghHJwhv8Kh9j1YaAE0vQRxgwlszy9UHopsyFW6zAd\r\n88p7zfWdvcvuqKc1Iu7xTjQBQnKeOUnbA63Dk2fIp0HyYWD7mZceDJIsNjSU\r\nuHPbJMcO2ExmgcFvZRik/98mglvrp2qk0gNSIiki/m0Yfws8vdXkEdo0ew4+\r\n48y4naFjs5ev2vIE1etq8oSsQ1ckKFW7CxNwCM9v/VgCl5GJbGAq37UuTRPr\r\nT5jFdxvB2dNfigotWbjb8EdYyx5h+wo7V9b7mleP51zt5slb4HMkAHfl/lWP\r\nGQbR6pk3DmjOc1Wn1aLn+oPJfgc2o8mJ+Bv4x4YzgPsNLDIryBcAA2ZXIKCk\r\nrhqWy7UWXS0IMWPQ+hbn1nA46/Qoy3kvJXnU4gHjGdPzCeXpNL13P2SuijcC\r\n47bX4vjwmaekNrNMa4iTIHQiz/a/WdkQrkQ6JoIYvzPgnkO7tfrkbtAg5z8O\r\nc3P4mL8gZnSpHVXq4eC01KlrWwoMAcErq/8=\r\n=zLr/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.0_1668062875845_0.8944184739783265"},"_hasShrinkwrap":false},"0.0.0-staging-20221110091025":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221110091025","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"0.0.0-staging-20221110091025","@pkorsholm/medusa-test-utils":"0.0.0-staging-20221110091025","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221110091025","@pkorsholm/medusa-interfaces":"0.0.0-staging-20221110091025"},"dependencies":{"@pkorsholm/medusa-core-utils":"0.0.0-staging-20221110091025","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221110091025","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-WmTHPmqFx8Wu0hAhxrLr48LhN1u+cHghXVZlTjNqRVFxkZXefwQU9lvDIBkvPY7N5bu3croHpWcrIATed+CY2A==","shasum":"5692791066777c1292377bad89efb0b3b2d26852","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221110091025.tgz","fileCount":26,"unpackedSize":65776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDHvZ/ETkLlzNZqovb16VHBB2oAhK1X4MkPYESQ4WIzXAiAH/UHV1Zzn8RySeRMvxi6OHnpsicysqBUh1q7/LXYe6w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbMBSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2fQ//Z5YaqEvjKkj4OZUgtEbWpWXW2b6tPJtNEVY4ddeSosc8H0KV\r\nMVVebQa5vyTw0ruE2etibWRE+imB4Sb7mlbGS530UbFojr8opTEa4u4q+b/S\r\n97qnKa8zXRrnisa+BfTb+ug9sq7dlb95m91fyVDNYTgPJ5TxuPOTGUPxvMcD\r\nJkjHCwSqLQqUlcbyCQmd0K5eONXFr57Kpv2fQZBUk7TXwOAZm4ba4mg4XoPV\r\npPFqBA68bQPMbKn8+b+YPFWRlBTKzux5W6uR8YWCIU8bwaUQ3D+pe7KUIZSf\r\nR6byoDH/DFNyg7Ve3wNsWzujLxEh969VVlj9VlZS5K0NUARaSAZqS+/E8P3M\r\nAi1zJIpN/6eiE04m6l9L40nGJU61TRCzF4QXjhRTgU19WzXPJcFsWu3pW2Lj\r\nDx34B3mXXO/4OYabXT4FQk+mp6MQfOtXumYneBYAX591XzTGGViDgFEdAoP0\r\nPHg78QlXKe0MwbHxLsxNie8W9y1MgGdDPIZ0Es5WGxeiR3jw27bjJFZeHIlq\r\nNAum8MNUEznPXkI65yfoV8/V48JYcvjlf6OO4axuAyXhPjyIGtRTe2TxYoSu\r\nN7D4OMzSyla7nxZd2wo5elI5gHAilcr47BQXlvYSMeUc4WWvUG8tF9WFPenh\r\n22jzNLHBQVVvbPL23iVeHINLnFzdptfbx4E=\r\n=syhR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221110091025_1668071505988_0.6651497936141693"},"_hasShrinkwrap":false},"0.0.0-staging-20221110094848":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221110094848","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"0.0.0-staging-20221110094848","@pkorsholm/medusa-test-utils":"0.0.0-staging-20221110094848","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221110094848","@pkorsholm/medusa-interfaces":"0.0.0-staging-20221110094848"},"dependencies":{"@pkorsholm/medusa-core-utils":"0.0.0-staging-20221110094848","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221110094848","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-K/82cjUAgWwO406hT9brlJFD3cUq/7MHwyjDHZj0kYXYz79S7NvvJLo61E54NBabW1txDIlRQKiSFCMXzkN7Uw==","shasum":"5e23b07a65b8349317c2ed08b20e2a922f8abbc6","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221110094848.tgz","fileCount":26,"unpackedSize":66073,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBbHRYjaKSzgkExLHgC1ziyxnuIxAsiuaVx/OPYWW9qQIhANHPqHwZd6ALhdmM9vmL8TDHQ55oXTjNUqLmC7Ypqrom"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbMkmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrLBAAi6fCbtw/x5ltiRWltv/1k9Th0tcLs+/VxNwkeRRDhD4Sis35\r\ntNZpXIyQ9W0fWO8mpNR49K9E+k4Kyrfq08OomKoS9eL3ygmJTOQPk9QFb28o\r\n28SXLO9K8LlbtC4Ebpf11g7GKZPp/Tl1wZ6TuWZKNqdy5F+g21RSMlcsSeG+\r\nT8YP+ptJNJi+I04YaTEibCW9PKKZHU+PmS0Fzx6Iatb9XmVArNw4qO7dyHKK\r\n7vXxIRR+cXM+PgOwB/e86tmzG0qhsq12pSX9nlTr3ZujGb8b67NF6DzE27UN\r\nPSM+lZFfTCj8dN1dOuE7SfEvQUcsj41Ts3wz4Mklo7LQvBnkZsnRRUHfCAKr\r\nD9NIeNGD7IT92Y35gnq8T54dJoTtiqpIfSVH3GOltmoIlOmyIMZ1yEUF6I+M\r\nLpCVUqwBAI6h2F92ghGhp39GjhpDtN2W70XjbsxVmsg35KalF+jh0NTWzcCS\r\naYOZycBulaMxLNlwRMDxLCcSORLE6bKIyr5696IGtS/cALMyZWUnJdOMEZgY\r\n3JpMpplTBCAYnANMcb27pGUO/zVm/WPNtvun9YYXUr3LDdFh5fCmrdWpV+Af\r\nfYqP0LmAS8G6qLgp8zOlxksAXWLd4EKbxtqZw6tou61GVzXp7mDR9N+ZDdNu\r\nq2IXnGeGW/xm11DyunHA22F3w+EATSbk7Nk=\r\n=jb6R\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221110094848_1668073765898_0.8150603484462249"},"_hasShrinkwrap":false},"0.0.0-staging-20221111015503":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111015503","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"0.0.0-staging-20221110094848","@pkorsholm/medusa-test-utils":"0.0.0-staging-20221110094848","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111015503","@pkorsholm/medusa-interfaces":"0.0.0-staging-20221110094848"},"dependencies":{"@pkorsholm/medusa-core-utils":"0.0.0-staging-20221110094848","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111015503","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-RcLe3rhlstsFypqJoJMQ7GuE31cMr/d8CKe5f+nDXhSaRKzedTJ1/J6Hv6mk7Qlbbb72nxJjgAtfqs5oUBrGjA==","shasum":"03291f74aa82d9684ad9bd87bde6ee1d0894e33f","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111015503.tgz","fileCount":26,"unpackedSize":66226,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiRoW1EDclCNVHREOpQhzh8TanJIz+b0LxVHxMzWikGgIhALwgOlVP2EvSgG1QDXt4UCceibmr1bNnLGsY+TJ0Jz1h"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbauWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8rQ/9GBCUNXbw7Ghep3FeBywRP3g6bKFdbHo0lMLl5NB1ys2GoGrz\r\n/CdQXhumy7z+O5+qBAnxfhFsy6ME+LPt7yDzzePT39VG2ANlN+yFLMkzvsTg\r\nzYcPzBTV2CcbYO49tLrg3Rts+DWSWW3t0GtTKM4bXV/M2zsqAEq1FiahOVRb\r\nL5VmUZEnQ/OrL26mtQz7scRhQ576AG77znCbYQeJUYw9/uW4HcA38qAy8Rrj\r\nUUBWk7lh1OZm/daBILP6gxJ9CCqecH7Tr4HbVDs5+DUdiDi487TaPovVGSG3\r\n2lOJ1pbki9xbELcJQaUYNEgmL/HuhnDp2yVNhzWoT0mDKdPy0PbbvkFnVOYe\r\nPY923yPu5jYp/356hJAqJDFyFUGzKReeUeUrFAJCfUia4AXU1QV/4sX0rtvo\r\nw6rcyldS5Hz2io9Qx5TMIDmYNfTFfvfE4m23ork5FdTxvbiFHfpAOI2ntwqf\r\niNTD2vluAAf8XHIqsCsvY8egH9oP6Eq2H3/QaIUToynLNNUwAIqVRV3B200G\r\nDHdM9btJUYtlzCAsODHonpyFm8uDVARTQLfSJpCE3RfhDOVrR3bQVWOLBrd5\r\n8mYmk665PMGFNdsNl597U34CVdESYEJuqmQkpwx2S5ouiR3njlzhJCb6z/Db\r\n2peanKB75jixyXAk+Ba32rW+1lEDY/cgH7Y=\r\n=BK+H\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111015503_1668131734222_0.11516793235440326"},"_hasShrinkwrap":false},"0.0.0-staging-20221111044724":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111044724","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111044724","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111044724","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-MxiYmiG7Oht/XyLuSi0/+PsIDQo+rdUW0xkuftlfa67fRb5bAXY39x+Dp+OuMnrCUjtKKjU8OW0NwqZU9ytRkA==","shasum":"2442b8fd0c20405ed2045bb2c006882cebe6ab64","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111044724.tgz","fileCount":24,"unpackedSize":63963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFyxgy53u6s7UOe2Oh21nNYk6QsW4cn/F9GerQRd/BTeAiB4s5Pv78unvN3khLhZmOj49boPeyeuFZOBMIJvfJT6dQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdP9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdUQ/+LI16Q5KwUdGs1hV64GKlVT6z0Ytj0XtpBjELCTrc8eg8MIZ5\r\nrRYRic6o3Vxheu7YZC/D1oQx2zbb8LS8pYLVXc25bZLVaxthxU7S4zWohjO8\r\n0bEvnsrwyOjxzer/fggK3RYI/HcTJ1c/3UUK9MHUQvS5l2lTdveVibRM6Ykg\r\n8ThU6Lml6+stYhxXFLHt3XE/ZLuv1fyfWykQjAJj6VS/V8oMsgaCeqTPU41Y\r\nktpOSc/6LstFSwlFqdKG2rO/1D2jJ0D8i7uxynZv/w5te+YLnRdpCakUzYaI\r\nwsiidtG4I4HZfEW50qEOEQAI9AlIzO5czdlha57K2uOXE+ZI+J9VfAlbulH5\r\nUVDo7reeBwdCXIM+PY96eEprGgt+hG5k11cKyza5P5QU6OittLwCPwQ92qzZ\r\nckWMJsfx3R8GrBhm9jWyUBr+cgcVT1UB4uFF+eXTuoxtfQPusNX9PXt+85rt\r\nJVb1YDxZQc67/zv1QG/b7Y4g/GY0MM1yLrpulE3GdkHGg4xSCpp9SETKC7hD\r\nXu8jn2oWmWAeIPT/kEMhHFn7+OBFwvsphqIFNS/El5Vw81/3dX4m46UA6862\r\nWwLYITpstx6eTJ8eIa9dWRJnoTJd8vBraGzo67lbwGFDoQb37WEmZ708JLbh\r\n7yPjIXSmg6FDdfunu65Nwss4W/qNfVgOXao=\r\n=7I/8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111044724_1668142077213_0.3352449910543167"},"_hasShrinkwrap":false},"0.0.0-staging-20221111045133":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111045133","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111045133","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111045133","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-HgZ/13QdP0BBcWPg8vPQi5oc7Gi1gpaVsXF8HFkuhB5+LPhResgLGDNEuA53pw0ub2yc2rI1XCdrsyw+vZ8xqQ==","shasum":"eafa04f6efe433640a939baeb7f3e9219ab55530","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111045133.tgz","fileCount":24,"unpackedSize":63963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTQJPzwE3OGwz48Bop2Q5S5iPAPaBzd95UBpVMgb4OfAIhAPNfc/qdX4ZXKRlcdvaoTclkAUBp2SAkM4YWCyYP1X0Y"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdTvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmosPw//T/9+r+mEfaJaU8zsFxYKvl5g3u3g7h3rInplrFSy9jZc6XtD\r\ny+to1mBfWXTB5pjXKWgTx7bUhfMDGmNOQZMYuz6LMLOoeSZYEgynXFO66hqM\r\ntm5sJLkC5+HYDW7rcE3JJ7dzAvGArQtt8xW6XxKKKhZEJrYq9I2qhzr2reRM\r\nyj/0I1x2se7HJ0Cf3ZQMeJyTCqthoKQHAEnjWYmEF0sTs5uHgCNDX6gUZAtH\r\nOVkDryXEdoh/NhZNtjmnvO9HcUlHAylYDNNXRcHO53dIfbQCbJGRgOycjRPG\r\nUQHuQpqagprc35rLvkqiP8HxAryebSJ/SdYs55WT/u6EOaELBUsxXoVTF9M6\r\n7qmc5Uny96neQxa1RMWyZ+CSly0G0QFwFTA8Gtq9gYS4RHFSmI2VObUFKjVl\r\nj+AgGpsz/C/8/BgWIrFq7vwC7GNsxCGksbPDDPaNhKc1hdCSLdgYfR547IRI\r\nMeFDQ5/Il2Szq341kbLIsvbGJIHWPMQdRkVeuuzDu1aCSZX9y8jDUibq8moU\r\nGuKqba1tlj3yMozH3LzNDqTDWfNDC7jhjPvCDABREodIOwPAdTczdif6WXfK\r\n3Ie9vPZ5wc4BM9qSLbpfjPCFK4iDlz4ugWVueFqhD3/jdfpo/NRlR8l0a/EU\r\n4wFd5NkahzijIvsMA5VGztq4Mcdjy9P3B54=\r\n=bYOZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111045133_1668142319717_0.7006824544206749"},"_hasShrinkwrap":false},"0.0.0-staging-20221111045920":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111045920","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111045920","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111045920","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-hCS7Gi7uIDx73ay4XvNnR7w1wrCal7KelfEnSNlDGT7BCA9TYWORe6ozti2nsPdofwh6zFDq4lw5OkOFpQA1kQ==","shasum":"6d4f5f25d9f873444805d97b5cd9324fac8e4326","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111045920.tgz","fileCount":26,"unpackedSize":66196,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwmmVs4Zujk7zHyYQs4DUJotwKdKcilMlv2cY/SJMGCAiEAx4atb+xDEFrejK7PbR9a9JOQjSLDw0jTR+kA8tFRJKs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdbTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvTQ/+PPEL0G8/LMXtfznH1FZj+oCTp4uvx5kBlDBXNfY2b2+epCtg\r\nKwOmd4jqEu1O+UkbkK1J9sjBmlTRi5w0rPtLKebeXjMm+xyHg3lAKDDbb4h3\r\ni1LhedH/LWlKZAFCaw4vHOz7FFfpvLpom9gp9esMJWqOIcqqIHU4o8HgiQoe\r\nGDO99ZhXJJDxsEKwEJ+x2bx+M92HctYLr9ZAg2AmK6Lywf9ZrPBa7MA0FUqd\r\nwBVfXpP5zXEdynvKgeacr9mKqX53R9brIxVIcI+d/92miDWp0cVEAp9T0pZh\r\nCyStva0+fiUCSgOAjR3kWVauXaiSfiG22xDR8xG7NL9rr9pO3nj5XkcLPRbk\r\nLHpMZlzw4ZpSagdIQc2CG7C+xbXC3yc3zzMFSuJZvpN7dc2+O+9BpLRdP1VI\r\nkODFhi/L0tlkpxgA5zdHm41mwc7NQMqTOlTymF3m52CQLiBs1xxOlMIFOlYq\r\ncwVPIRyjMOwQMvUI1ASLx7OCL5BlSIldZgk3gSE3aTC4zJoeIDnfMkDUlr0u\r\nQlJ82yOoUgyAblKt30rjF4maAuJsXtu4qMv7DketITae4nrqu7YYD9WoBONw\r\nVnFnhd4hUVI7tRw/WK2oIKLXOQ5D6ySSfNvMzcQkb5H6VRe4e/uwoqVFqX2o\r\nXRrvVUvuK3txyBSOsRhBoaBu6jwz9LcBNiI=\r\n=XlEv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111045920_1668142803653_0.9130973431788552"},"_hasShrinkwrap":false},"0.0.0-staging-20221111050432":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111050432","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111050432","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111050432","_nodeVersion":"14.20.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-hveuucSo71FP9Hc/3XydpGL3d0OPU78uv/tE+f2ZKGrrTD+l3CV4X0G9yWttVzm40aUx42OzcqmfNj+dq880vg==","shasum":"53ee6a82e5114fb999ae13255b2b43205742c660","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111050432.tgz","fileCount":24,"unpackedSize":63963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsYw9UrxR6NOCNytXT6eFU00cC+WOa5MyuVHhwQ0ooeAiEA0SwGIF3ruNMgzOqPvjdQFURL6GoNIC3ZZUQyaHjGkoM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdgDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFqg/+Kgor1qOsFtYEO5FkZqhejrhYzVVes6oCMi2I0+8XFYDI2Kkb\r\nWAaAdywdwoY6WGJGtKocLVfUN2EwJrXuAfu507IC3l7Lm3fI4S8YCgRR922Y\r\ny9nV0e8VEjmw49FB21vgJuqQ/dNVvBQAn4Lp93bkvj0q85QWbJ0S4VaYe2MD\r\nQY4DJ9xAPuHauvQQLESMJ3verUSeSmhwc5z64jXqIoiacV4N56VuLy4HWqzB\r\nER2BX5ZqEDhI67/6abIZDykFXMiF2Zym9cDsAFMD2IdnfE/lEQJtEH1jx99M\r\nzsVobjc4hsONpuJFcQLdak3A1W4pxD0MbHun1EthwjDlajEzSmUY26+wFgxu\r\nua78h2Lxq9po4ZfX3+iSaa+3gaI6APsnGnLpHa8IBPaLOMpAcr4lvHPB0XAL\r\nH61Kq/kMqe+rPBLvRazOLp9IXArnTXaEYKk30iBAWn4jVV0gGQBXVv+POrMt\r\n1KjENPio/GpX+iMSAejeRSl0PUEa8LysiI9swGj8OkLQnG8/5s7o0kj7J5W3\r\nUWmaQg9xLow9wYMMc7ZCOnrxPVtZ07NmAfOzg0w7aPVlPBUHH68zrcomGGwf\r\n0dlJUCTNVin5yEB+zRs4ltrOrLa1LE6tU04XA5uVIDz4pypby8gijKSTf0Sv\r\n5BgiPzVEYHA/eREGa1V39u1pdX3jCk4BHwI=\r\n=btQM\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111050432_1668143106883_0.5824759763831708"},"_hasShrinkwrap":false},"0.0.0-staging-20221111050935":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111050935","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111050935","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111050935","_nodeVersion":"14.20.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-rVWC761XQKC8279fLMhW5Wmfe5E6zxyqclLyqcVd3E1Bsb1ofKDkwwcSP1ZuSxFsAtqv08pXVu36UcyYdshuUg==","shasum":"2f46b71079a4cd431759a4fb19b43e33d66a27b9","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111050935.tgz","fileCount":24,"unpackedSize":63963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxSr22Ebc7D514YSTuheaoABjlVsI7WcbeDxt0tSjSRQIgdj+OkJNRUa7EfNNuMRZpCAgagjRLVDG6P25j6W6K8y0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdkrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7AA/+MpB5C6P8jFLQYtCL7zchbU6E1VKZ+U/Bhk2MMzuaXN5ybNYb\r\nJfzASh0FOTqu8fWURl8iBEAh6T1YLswxMnZKxEQqM6hO9MHvE9s0pejJimOl\r\n00e70tyblamjSiy14UXnr56Sxm76Elq0ZBa3EWUBtS496dSyHAnmplEWk1ZG\r\nmdmjRNkdSVtd8CCMuIkk+iqOsJufo3WSTgygNM1NOeo+NDBAtGDLockbcxLV\r\nE1Yn2JGge7mp1EVM5LyBl/FApXBU26h3nHrNUSTQKduEKLTh0kXQdPslLU5D\r\nzWrTaiihepNLpwRWcRQJFmQhEysZUlQjKUGf/rrHuv+YhoiQowcLrBzo5yw6\r\nr27p4wqhqHO/SlVikEIT0BmJJsHK1u9iYcBcE9VzQASkPE3ntBd8ymrPzYye\r\np2ujTSPgkv/4nqhiAoobD0kYBcZtPsY//1NQgTeLXzmiHjvdV3oWcl5sgQBV\r\nIqWO33yJrwIfty1U9atlr/8I3Oyf5OMqYX8xWt4BJAAzygeXu+0r14yu+7OB\r\n6MpWKob5HKjlFREGELOv3bsMjtieNln73XzXiq+a6LfXsZTIIGe0o+6Hfyp4\r\n8ovFLDKGbWGoaHQCTS4rB/P2XSsixaDcVoDJoGi/vrCZzywKEc0NaXMesF7u\r\nysnlp/5gKph7s7QpV/GRpFnERL9xK+5dYCI=\r\n=BIt/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111050935_1668143403025_0.25368451307452555"},"_hasShrinkwrap":false},"0.0.0-staging-20221111051631":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111051631","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111051631","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111051631","_nodeVersion":"14.20.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-3aDTIBfqLdWcAEQzjPrMWq2xkTGQbnHWhyx9MGijKdcYKtlm6LsFEaVrgXxkXnXFhut3RpYcHnGSZeiHrQmoxg==","shasum":"dd1d678337f489e21390d82268f27172309ddb4c","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111051631.tgz","fileCount":24,"unpackedSize":63963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICsj65qOmGKfFmaQNdo8kCQQsAZREUFp4Vpscj3L53yNAiAA3faRCSg7ZuLiLQW4GZVQy9CK7fGPnddhgchCJgtmSQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbdrQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRxQ/5APmuB9hK+FXfpLm2gfUo+j9dIdpip70yu+cJmAbalX73A54/\r\nNv0hTklDNqc/19Wr8P3nXXIDJS2++9oxTf8v0K9Ce8V1EaluDQfUxJKukj2c\r\nA7wUVTLRZrAoW9ox0HQzev3xBf+EK6i5r7nnCHmJSRfu6xQBQAd2WAzNchzM\r\nw0ORXdGtSgKg5O7peFZwUtj5aprFr6LpKELLBtPgbOXAFBfnk2VMYpe5WgFP\r\n1+9CVkDR4kgxl3HLF5Sadnhf12AwKb46uCxCmbJ9XUxyRsFoRp7FkB2kPaIS\r\nurS+BOqvok4bpGSWYj9JVuMWmbDV3TJEDsfcYBOhYyAjm4Kd/4uAXjuOUqSn\r\nrEEzwHlbT5oQpwCOxNIuQdoyq+/ewh0Bsc49KCcgBBcCU9KNbMk4qv0DuoNB\r\nYtLqQ8M4oh9kFfFSHiibSQk1MPc7XABUE+vlGcixn0bw+Bh15F3aQ85/Y2zm\r\nTRE5WeHYvahZZDdHgpxzl9gBUdpWE5HopzQXRnJYOysQV4U72fOEUAdZD3gg\r\nqMd+IEXbNlCer845xwyYm7lNLYxXPvU1qjbnlvfEY/NmAa2asJk848JkGcVH\r\nlmJnApddNqx5FSjYwMNqYQuUuEudCIDOE/R8wWqnxnmFBxMwE86stXb1UVG0\r\n4sFydsqOJ6+q+pif0XbNWCBn5vpcMhR3vtM=\r\n=ut+V\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111051631_1668143824447_0.42375548199485147"},"_hasShrinkwrap":false},"0.0.0-staging-20221111054908":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111054908","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111054908","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111054908","_nodeVersion":"14.20.1","_npmVersion":"6.14.17","dist":{"integrity":"sha512-/Tcfz7oVL4gi+T6wcNHo1LDYzY3TCXGTmeB6G/0fCnGq9szK9XvktX7/Pz8mDZdEV6PRTbCpKBTC6dcew/PHdw==","shasum":"c07c0fcd89cef5a12a5a675fd67f227e614b2bd1","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111054908.tgz","fileCount":25,"unpackedSize":64014,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhQfJ6ZcG+2wrTyNNPUyB2bW/IZzp7O/ZTlDqAxyDFGAiAm7FtqnAjFpeLEAON+7nZjlc5tYFgN9KMlgxvoLxde5A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbeJyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5Hg//XqNT8P8V+axihL8HJJSfOmA2cZC4WmOUL+b+neLlh4iBmMSy\r\nJkFFpBuTpYNHoE+nf6QAmr5vD32gJKE907TMxiRiPXnHfxJwyJDYxvBbQLdC\r\nOA8uptotYvUVVB9obOb3C9Wc7BHEFf6MxrI7C0/GS7UDwBOjlBcUG5tieepr\r\nJDFIRBDKPoO6tGrfdFBbPnYMUZBql5cw3muuAyoDiDOLdGg6Zss60FPY9k0B\r\noo7SKcxSR5dfGa4izx0oi3t8aLXntInn/WKnDs/Pq2HM/JB1zSn5ta27wPdx\r\nA6+wjr9dWGkQsRdz8KTX1CSUQ7duPvTJjaTMeX49aiKMSyy8QBa3uzuPFkLY\r\nIYohj64n1jprRTQcOAXyeSxeMcnSy2fXNz29psKlXGa8DwxefKTB7GIFve3X\r\ndM4Ow0rykOGGjif/FD6rOJosMLAPjZ1rm009CMsIiSLHtxbNa/CF7GHIlXY/\r\ntfHofmMrFQKjYpSxCugRbQTXTWxfEQWRSNR58vKe2UxW1hxnYd3kSQqeVBhV\r\ns5xR/2LG+Dc83NmnKOJPQ1VvJFmkK878St/0zOCpk2BRC8w1+RXs/J/K0bA8\r\nYw1UAte4pmYXyQOvQD9mWrfflJ/s6XunWDskJ+n8yjX2R8F5wtvR8P9sLqK9\r\nVo96t0BJW85KgEDZvxtvSPFah4AVE68CTqQ=\r\n=ltG4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111054908_1668145778565_0.8196235510181105"},"_hasShrinkwrap":false},"0.0.0-staging-20221111070030":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111070030","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111070030","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111070030","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-omyatn+V0x8pBuAKaDxacVad0p2Xx31USzUlyu+JdtOL55lnhblSCCghH6Nlg6gBygyDCyAlPSE9c+HPzEkwxg==","shasum":"b9aaa380f4b05b9c073e5ea0784dd143858a2cc9","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111070030.tgz","fileCount":25,"unpackedSize":64177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeL6PZx47OSIFXPC52GYuD0xQf0ak10nZYSzY4JA9LlgIgSCz8CsTw19kcjgJIKG5UtTxDAYI63gQohXOGpV+oB4U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbfMvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiiA/9F2gPObnjyJ5y3H82xFmJMh6ZNhH6eDDmY3t4sh988EWCY6z+\r\n0Q9w8gYbY3dAu2fv4wtPkAl6Z8+rJxMh1kLWzvWjYtbxxhokpwxsy5ZkBVwE\r\nwTxg6TiNRjzqVS2tA0yvpTKTxVRIeHSnQ2UvWz7A7eTU9LGIx0Xw7eJnJo7b\r\nQJGM6awe1TiHPCOscbSouXeLJYz6jEXCDV/DVi1BVrY5MTHV6Mfq0+JUevTz\r\nKp7FOkTNIXLe1kxnjZRfX87z/R3GhGZOO9a0/3hD8gHYDH3RMl/UrtXXFa/n\r\normVx8Aq1MFm9+xghBaCI5cb3Mp+7hC9uH8NcMmoTSA/G4eIqkjX6hijjo0r\r\ny/nv3PGsfPeb/sZ0RcEJfGrM/D9/0HbaW5VjxxLwQTTAAWxq5ePFkFlHN6e/\r\nKMx8WnJGwz3lrZcKfN5w6LUt+VlII9WW8IOXp4KfldLMu8MNy9V6i5wr6Lwb\r\nHt7UsRu5wgayZXRd0GV+Z6oeEFgBqR4O7kapL+8lMJMlXuIRdj2Uq+bDbbSv\r\nRW5YLDsAmOP1FeliKNRFr5M3jy2kSOzmcOCJn+fWQYG+NnreL16/ybBipe6p\r\nFN2qax2VEacvo/QRKHMPGxp7YUTFGyzM/6AdfSSWupSUKKu9A72NJr4+XmGz\r\nw/S5dot8LfjbSCHRl7Td40GAsTBrK4n8Q80=\r\n=krFn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111070030_1668150062961_0.4713698958837915"},"_hasShrinkwrap":false},"0.0.0-staging-20221111084533":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111084533","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111084533","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111084533","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-3jS7fY0mv37Kv3t0b/sJKpkffq+yYRLnyqduyoGkbks38XfpHq33z7DsHjGfCgVCl/W7g1amcnOl/wUwmMNbxg==","shasum":"e0570fbb03e26a8d384813c15540df61691a0531","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111084533.tgz","fileCount":26,"unpackedSize":66361,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNZ/izjqqDC74gUu6KGeIV1UM/Ar5jKr0s/7jT9d1x2AiAB+L4LKbgxepcFTfvN6lVRUDtdda0frEggx8E2Bnfadw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbgvTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre1g/+OYiqmTQX0M3cmGqksky2TABzYu2kkq4hW4JjBQ+9nBCSKY9O\r\nkx8/d7XECdx7U7RKX1XoY/pqXfdQl6VbUMGCHc9hc7bUxTp35NwTb0GAUkmW\r\nBRkGi9z82V8oKlwILS20cGaxa9FBfIrpQLgXsWQzYRDTDZNZCMga4/kCSEhI\r\n+OBnB9azM1WbyjpgkWDOOJyjHVxT8WnjQwWBBM3hgTMfqjpDqOObeGBmMcvz\r\nMUELFFn2LnPIWxLQ/0ZVLe2+AL0fd/I4bobNPsn/SCENzipn+wKApgypYfoM\r\nvHBWKOYts6g9XeegyC7WCZagLjwa9oY/mtZ9z45XCONwX/yeSBRlPtFyE6bJ\r\nXG7NvH+r2RXuwEjs48rEd8z+ZgjlVuBnFA+gI9WYXvMOw02ptViinMH2u4KQ\r\ngKXVRm5pNlaf6m7NyAV3AUrLfnTE0pqSjjlJA8aqgPCrxIp2AH9KTUcTYzxx\r\nShCzyrP38SsW7TqCnEb0qlwgkpvG5QBbGCzXDAucxEmy5lWhwpqLLV1MqVHt\r\nrY3Ic593uJpnA10WSSO5ZiqxZ+fVjd+X2NJEI1ye40iePeFULDdjexNp22Qa\r\njTUcyBoVlHC2phIKErKbauYHLIiU3glbATLxz9gmQPcTFdstqsQDLYHi+9Rj\r\nKqL28lw7lkKKo7kxFAwqwbgo8LPexHvm+dM=\r\n=o83a\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111084533_1668156371577_0.8543608984654774"},"_hasShrinkwrap":false},"0.0.0-staging-20221111085456":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111085456","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111085456","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111085456","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-knGC5Nls//rddMvlzIrTtWTgqq6AqmoEeRMz3Qn4l79ZgfGWTfndyvOmtA/1jbqQeELhCbb5sibjW4HNalCkUg==","shasum":"57b029582253961f33c465ecfd56293b455a7582","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111085456.tgz","fileCount":25,"unpackedSize":64275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwTz/0Df9UAMpmgLqiRdFzvau2Puft/FaUGp8kqOO2VAiA/KlQajo3qeoLUEDX4icdXk+KRuJsDvMO3eQ7dg0FSzg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbg4BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq10g/8CHCsWbO0/s+UiWm4W9EGUOvRdw+Gy/Wqf5W3Wy6aZBALmu+B\r\nl62tU7B4DZXreEYtfGn3S2bFr2nGb0cELmaxegfUVCzzSHS6TnNL+rCg/99f\r\nhGM8t16BP+M2I5/UkPNa+N8wSQ+pogvc4z/H+Mp2I0AtK7CjrwzjYGc64Zp/\r\nywfOIjWzFOCiT9rq1nwOVt9TX6pCnjbwIW5MX+IRrs2WPPhfjU9p/p9qRq6o\r\nyhoWld8H6HZPbA41FhXy3Lz4bm66GB2M7Cc+/jPLOrWmeGum9AnUo9NWXMiM\r\n3s4eQ2shJOTNqkA+hIsY1oPcM2W/rFrtolCROssCIYX5pYTWNI1zUQ9Ipl8U\r\nMtM/uMm9NqMe3fpzmjMKea5c2LqfC2hJClg6OOlHCE3WCZf28X1qqmhJB0gB\r\nL1sBCkObtWx5xDXQZmS2DbRulHq2LcJv/NegbOVhTCj4okgGG15Pb0gULTo9\r\nmje9XjbX3QOYqT85GxFVrw3cUWGxwvk0fA4Beok7R+ZrhAS1ChREtlvuL6Hj\r\n/sDJzZZm3M5K8/dDNcbcaebLDklscC2992gfIJqbRwZFEPH9G4MhUO0e9dMf\r\npYUZfn0UytfK/IAKaEznvdVBYhEBAMmsacoMAljBxvIauspZHNokui857qKK\r\nEIBkLKYQong33WLdGfoRkcvVVo0CgWfgFxc=\r\n=ZQLU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111085456_1668156928862_0.03142127838386832"},"_hasShrinkwrap":false},"0.0.0-staging-20221111085751":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111085751","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111085751","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111085751","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-4XO26xtxXBry73YLlgKvhhvwIv5Yznh9bmQAKGVo3Eu+dz2xaahSJmSZXU1i77IHJrNthyGRzbRySu5letHAtQ==","shasum":"dc9531417d46677525c8ff96545fe61ba443db64","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111085751.tgz","fileCount":24,"unpackedSize":64224,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBG0cWWgdN8oah82hvQsWOa5tis+R2xAkkXbG8tfusACAiEA6r4VXBAJgO3DLdyNgbKK8sB0v7XYI/AqH/lCuVv6Tlg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbg6xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwEA//UKkvOdJz5lFZMR7cPZ4LtLfWCBvBLMgpSWssQIFvN8/3FoKS\r\neSvaUpdmmFA3JoArKCQeu55r4OyHXPxn405Aa0DlI63o4+cRoobTLoZCqiGW\r\nRyiBPpxijGqups9J4BfKRy36TY/DV1fHfs4SLgheZx6bwwOcTCKVngLs2ZMh\r\nCIlb0McYg9R8kNhAOyakVktWs39vgLLJBaftaQ6GLk00LGlCAPgoo+UeGm8S\r\nsgqL+/gyKywJ1K9PIZHOtbtdEMcQ9Zq67/hcFLDHKOInsKX/BGUEtAmTXPlr\r\nFBMGru7VyaFwxU9WQX01yOZEltcun5F5UCVNWCkDUN4D0RGyW7w1peX4Sxp2\r\nWGVTjtdb08eKFdQFTxIKP20NjGrHBVYxHYObT0w11Rpcv018lIrubyQzqvPT\r\nlv21cP/eamDz4maK5uH4gUKBCmXO320EF6+bPWMal8JrDEB5F6eEiCiMWzEO\r\nT9S3kVSU3jsvBw2xhrYbSPycmWEKB6eJqvDrgDkHDyTaEc9f9cLV1Nkl4U25\r\nhmHh+0iIWTkYrJkFCt2QN3xv5HBRtIRldnl++Oz2yEXy1Ao+ljvfGhWRWbfs\r\ndKty8rNZbMbAc4PO7CxYET3gWP6uga4rcrKdf4p6NMVuPToJ+65eUuQWsRKR\r\nyE9g81Mwf6MEt+SW8gy4poXabDqoAYnsusA=\r\n=vbZz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111085751_1668157105080_0.6796899196819624"},"_hasShrinkwrap":false},"0.0.0-staging-20221111090402":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111090402","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111090402","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111090402","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-kggPZAPV7F5NVUdYadMOUZeOmCzv3QD+84hHxsbbhJXmfD8YNuSc3U6PUEO0nAlT/o9+vXbKczx37hQEZ6u1DA==","shasum":"49061f93d57c776f13dc53a8fe5fe2e20ddb81ab","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111090402.tgz","fileCount":25,"unpackedSize":64275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbywbIPlQHvYxlCn50kNL+baoqYhEs8FMFeCfRyQqtKAiBhZrtWWOAcX+enbrtxtfscBFcByMDdmQLE0gsg9j+7XA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbhAnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7YQ/8CYvUSBa5HX3si0Ct31AjvA1GNqghhUokQE3zW+84TQKbyem7\r\naMkunXLmwCaSOJr3wP4T9aSLzAp9s8F+WFerCV3Vo97DXquxpU+uQ0AXYGtk\r\nkQhq6CloOBq6+47RGrv3wV420poKkzRBJ+v1sFUzxo07D/gYu16y23+8NuHy\r\nR56rj8iIwlph1G0WMX9QcRm05CpjUQK0Ho8FIwMbqvDmX7j62rrYx0EWGgDg\r\nMS5lEY+4z7ICt9O+RhGT4HrKfqkR7RZU7Y6aw/y3AgOJApyaYQlo7aMGrt2W\r\nEY2jhWRCAQtG41a872mNrdHdJXz+dhCUVy+hlY40nuIioxPcKXByY7XlXdYB\r\nHjAYfDMz2Da8s2PjAFHFzHBn/DgRVozRU75RgdcUBUDqAzUxXNAi0oGvL8jZ\r\ngvg5eqRaZsJZSzwxVBegtn8iV8S3rNKRTflG6hb/NVEqMBWRn4/7Eseoejcw\r\nmVFJ6Hl6berozvxaowyVrFtjhGr7JVDCe1pillShOhLbAvivjYMSIng1HJoQ\r\nU1Zff50kxeHm/6Pa7Sap8RsiRMgs6TDJRGz+JRBOtzVvNsJieCx8BQ6PJ15f\r\nqiPzoKsRLMH8Wa9gnqBaDXBIKCiPTTrHTq/N5E9pq8dVqQgQYVLVNZqkUovV\r\n+tHNKHx0gcTMgiudNvtZVd2pX6HZInWF7R4=\r\n=Irac\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111090402_1668157479292_0.6664170095771382"},"_hasShrinkwrap":false},"0.0.0-staging-20221111091336":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221111091336","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221111091336","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221111091336","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-d8skWV79Ae9BMVcgQJED1XU3mXGf/asgHsxPWNBYbc5tjo6S6u0P1geJppsjVmp4Yat2Fx1dCwXG38t8TX6QSw==","shasum":"bbee818031f943c3dcba60afc32c1b5bfde919f2","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221111091336.tgz","fileCount":25,"unpackedSize":64373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3hdszlHAN5e98OrOBDJwmEfB0rccisXzchPo08nC0GAiB3Y2mZbNH1A2CN+Qo3rexPGzEr5q9Iypzok6Z2/KTLfQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbhJiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIsA/9GzjXJWBAwTHFOCloZkbfsNqoxm0pf4kber3C0eXCiy1ChLXZ\r\nZlFO8MqUcl2zwhDokJd1vHOF7qbukL2lfFUuHtJZQX8en5yFUVSKVfF5G3kJ\r\nkqRQQ73n7q99IrnRbKFyvVceafOw0jTH2yy7tuXhTuG7S3/xvjXb81t/J2TQ\r\n7Hq9XKl8Hem0zwaAL4Odihq7JIbSOiDx+qEoZ2DBFAkfcfLh2mdhQt7znkm+\r\nlF8iiQQ+bOMEHhvxsNnlrJCONrFLW9iCRcpssOgyMlmErZTLAmZmDaAfP94v\r\nh/5/TT+UR6ZKRPn6CaYY8elz1HJ3eM0duJ25lgEE1tZDnE6v6J0zM4oUAlk4\r\nFU/VZAre9335oRTGHF9yL4/XlAu60fXd9PcGgQP4O4zRu2FVtGi9j8VaR+o2\r\nFHX5N+sQzQMpKCDxZpiZDHagKfFcqIOWp5Di723tjDp9g/f3jhEG4/ab0BFs\r\nPPoPLGL9xTG8eTrHW/cmTlI+RLiVmE/N85giLNa7akQBsZvIVPfGgZTTn9Aw\r\nfz+YUSrT/YZ2E5dlC3phC5pZSecr18kAP+qGbpCUrTHiJASgG9AzTwF2cdk/\r\ndmnrBO7bXHpydd5x3GFpr1NW5VR9Z2XnGoGjXlQIsGQE7OiVT/1NDEOop9Yu\r\nRd+kOIg5G7RiTw0ZReoV+wdmfvozRoKa/s0=\r\n=ZCJW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221111091336_1668158050558_0.9466721504000826"},"_hasShrinkwrap":false},"0.0.0-staging-20221114093335":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221114093335","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221114093335","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221114093335","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-+p6p9l44sVCq5d2AYpZzjVrARCZF+vZSTEH2z5GSwu2AZIHCuV1ap8YbirkCbEyVk9uyCgJuwBCoy6L0vfjNKw==","shasum":"2d0974b68faa4bbb29f930d7fc0376307d7151ab","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221114093335.tgz","fileCount":25,"unpackedSize":64373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC541nqjenam/8YbKo8QWmX/i2x6OC1vjlF3hv61U4dYwIgFlvnHF0hEgA687JsykavogBz0NyJ+VhJuh3jv0IJEs4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcguRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3rA//fB0Z+N9OvPkxbeSQxoJXMiCZC2YN0vNfI95e8hH1LStIaaB6\r\n/UpaF0P8N3v0DlRA6OIX6ceN9qqs0ZCupxiOrs1vInMQL8bURtVUNE5dCrcz\r\n8ynR7OTu71GIHZvBZOgheh3GEDDKIQOK2afY/qetmrVJfRFYDA0T8rqwyy9h\r\n85XFl9eCJJM0j9Y4a0nqW0nxa5NprgAsCbVVyTzt6WyXIXRUcn799DSBB/k0\r\nfwrFNHxfinC/JLEcHvO1lizKA8b7vbM73r9EVt+wScxwXZJ4dsof1oL6MPH1\r\nKqVRg0HoPvEER3LBBe2JCTWJtbjJi8NxL0m0NRDI7Acq4TvJEPZj7TqUeGDr\r\nBqjmBt9YN1nXWNu+qYoJkZDIMlptKPaAD8iJvLP0a9JQAK/24LrLO6ROpSMi\r\nlAvTVHSj8tc3EE/IsNaTRV9nnzErGWAf7jNM7h9zkbc+qQEiU9dUKLJbTzi6\r\n12r5SljPMZMD7dLpKSSG3AFizvfEL+mOy+1v0eTKljSXhsSt5zTEjYmKleYU\r\n9uXhmpLh//WdyyM9MM3fHcS3XaolC2YFLLVeI6g59oML35CublKkYw2OdDr8\r\nbYKJVGlaxzWRYrpONO0oxnktXE/hIGN5Da97GbBuyZMcR2Sga7Yae9q5LEpo\r\nQU5D/anm4t1uy3cCp2Sv+UK2r4cg9wCHmdg=\r\n=OVYH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221114093335_1668418448930_0.4184870305100423"},"_hasShrinkwrap":false},"0.0.0-staging-20221114093650":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221114093650","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221114093650","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221114093650","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-YNol0fN8xGLO9a0dV2WqTxzFnU2I3yB5E5kEqup8c1Due6FUSL4CbxEI5LpoVzq2Sfl2Td+J7SnnJesu3yxyow==","shasum":"b2d3c4b67ee548acd60a0076072b06e27d23f071","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221114093650.tgz","fileCount":25,"unpackedSize":64373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWtF42CpMqd0KiT8BzQJMpk2BhWBZGiN/wioiH5DZoCQIhAJ7diItcMHRyd8CP5gR6fbB5I1lDm6vkPEwIUxcXgFK+"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcgxSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFZA/+KuNK5EOZIPADGvzktKce1iOoQLB/If1a3SpybXWxfrtUH2x3\r\n4xuQK9LZfPAs/WS6LSJ3mNV7W3t8lnPweITkdNZM+PZmezP+gSUF7dmLa4wl\r\n7V9kUEBJk5er9bkBLUUnn8yO+dn8KvSu1OZXt50gocZJFDF4jcWvE3iEzHws\r\njt+lA+HPR8gHYF0YXeZ1Ti/3+2EXnoBFYFq8s2KPWvNpgqX0ipXv/f2oQ5Np\r\nHwRJgDctzbuGG4F4Lx6EPCnAwau2cUPnGABrfqJ1ASo4Njog2xRZa4j0DDR0\r\nC0zroECjb2W5oSsqJ8WVxskbJM9BJ0Wn3zP2BdyeITEuymEfrhvSWw8c+6Zx\r\nuj/gLnWJ2zY1dRKjIgaoneW4H3UELWFJG38D907zK0Rt2G5QAspMmDy4bn/w\r\ngvUPWZoWkc7GNZ3M/Kd++i+2It1FWZplMpjCXD7OZlhOAu5tXT0dznws8U6+\r\nmsrUIFjiZNEY/FSkanx5xHCGgjG7JoM/OM9dfSJhFdxrY8369liSOiU4OA8s\r\nb96LbdXQcjSRX2hBqDp0hygPXgnGgP1ejtHmypbgrkojH5wtr8DAS06euepc\r\nYoEygcrWJ8NeHBGYYYiWtpijQ+qlhH4mWYggiyCF/UZq0S7VwtWfdH1d8j86\r\nKKF+wsOP2z30w+0f8n7zQyR6wNq0YMSWkXA=\r\n=nxcv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221114093650_1668418642637_0.6605563038431519"},"_hasShrinkwrap":false},"0.0.0-staging-20221115075706":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221115075706","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221115075706","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221115075706","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-k09I2mtiMroadG0GUBV4a78jE4TbGF7Z91GaQZLLu1KQySn+BxUbeLjlHvZ49O+aLGrfKRmx+j7qv7juSLWX2Q==","shasum":"fe224523df162dedfef00db0b8fd641621152660","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221115075706.tgz","fileCount":25,"unpackedSize":64378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHt0ZPOEjzEkDWfA9Mmb0TKk02WLSkf2SGOlynmfArcAiByDlimIWFahR/+A818B0+dAI8EsG+0yV0EELINj2oXkw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc0ZrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOGA/+LW+mlRBB1NS+STKClxS8EyQ/ofEvut2uXooT+PysiVOjJmw/\r\n1zOgLRqxDvw57gpC67pPHyhE3xEnrvI4/S46lGN1JPruyzvWYEU1uMQq3O5O\r\nBvWUqWeMEsPjYQpfPC+AJ55MpXTh/QHqFOCstF1SyQMz1Yf9O3IQtLq2JEuQ\r\nM/Rqqn7u8mpzePpFnwgwVkU6phP4tSDeMhtn+xV/Ni1+YC7G//nqy8LZ6/i4\r\nCkthoYtgeg+BPOQbQtJnPAvceuqDzXE3aQvKyQ5upN09CmkhvpkrTlk2v9/F\r\nVWUuw3vjgjZOBxvQbzc9ksOY+LjfzyHUyvPtCkzon4KvV8rFYacLWGtFIdyH\r\n8RTaGn5ZVJPTeuK1+TED3DaYkrYiseTUMzKAeDZufmO1VB0e2vJNXRU57Cfe\r\nxQ42KysVhQKsEmxxMXUaqpzrJ1teIp1mpIxY7fFTsZiBhQiuPgdklnoiCGw0\r\nCGsC4v51GsYK93VjZHJaYaIhiNB03yfMlQ9H5iyVRus0AXhRj55H/JeFWdL+\r\nCS1tDEc7nrBYXqFeqQZtp8fYfeeTDnZWd/ITEvQ59Ausq8CPR6otod7082x1\r\nza87FCpAqJH5Z7k//ZubC/dvCXtI0gPnOfevDCxr6B728ixd0lXkWJv/dEcr\r\nWn3JumDhdvqQG8KdBDKAqJwf+DNjdhFHfSI=\r\n=dQbQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221115075706_1668499050979_0.502822866825495"},"_hasShrinkwrap":false},"0.0.0-staging-20221115080331":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221115080331","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221115080331","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221115080331","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-I/s6SndP+1n3tyS8R4mS5eUXL9yVdWZrN51DWElh8HPYr6DdVTod9DWm02jMG9JZJ5srk21Lc33pKoSLfiPy1g==","shasum":"b49b2fc1d12df72cc9e8896397140c5aaff6392e","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221115080331.tgz","fileCount":25,"unpackedSize":64378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKO5iEtyWGMrGT5yC2BDp7EJ6h4Sf2YuISRofdfSQckAIhAMHLjX+2uBpSvDYUMs6AAAQr4DlpmkArV+4wemJJ13m8"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc0f1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhPg//c9KwN2f5UtgYd+HhMUODLE2uQ0mxoDeq6sQPYbGlFnn5c0+n\r\n5tzI5zODj861SRKKYB3P+QSJL5VWQAJwE5OvHDJc/nZAeqH+xprTSf8ZMymu\r\nS1kAaOPnXLFisVMFyqK6zqNceeOF4D1siXfgeoUWAd8644YaIuNnNFZAPtaA\r\nBG4F8uQUsnW2hc4CBzFcrle+U9J/3KPP/Dt0qjS9wk6j3TNHHnOsTNcuV9qa\r\nTqLcNOYNdtuA9jwn1Z0Tg83g0YNiLu2uV4bXNBK8vkuJ69J2RGWW/ogoCGr1\r\ny2tu2aAs3iRKDqc0SNgc35ZGRzmYkQlTRwBOcEng8xDq9V5VkR1NitZF1Spn\r\nYdOI7FSTn2Ebx+GjrO+2yYwfDq4i/NlVWJ0mC2EchfWC2UrCqOtipKDVqrQ4\r\nIuKv2pSMFDnau+vld3vTxLNzzQlehoJXIzn+gHxUF46b3BKoDwxBFahQOFfC\r\nBhnjuCRdhXNXyhNiLnyZ0HSkGS83BBIKBSp4peL9Qa4JgHOo+XKjY7eI2RRZ\r\nCpac+0irGfRMvBPM47/98jsELq15ku9/GyyxCS6VVZG032/RbLwolbjIlILW\r\nVY1zWQ5St1YYVmWRWpMPB7CKpfHCE5qEIdQvVn9ugysfDdyQVGPQEwq/WVjj\r\nwLNyJmm+7My/P+adGYp7W19EKVsRmCbRlzs=\r\n=bRMN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221115080331_1668499445675_0.28535950303465607"},"_hasShrinkwrap":false},"0.0.0-staging-20221117114840":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221117114840","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221117114840","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221117114840","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-SNnFSKk257YjwMDKvEn3DREbahrKDzoLnCVYCdS7fgEWVkrX72at5mMGryAzi9KWFTOaeqGZvPQ0AkkZMwMbrQ==","shasum":"404e3ce61fea2de9acf84cd45162df24fe9b4b7b","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221117114840.tgz","fileCount":25,"unpackedSize":64378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPhqN/Dz1sY7EAK9+q3KXQSZwHGe9Fs2QBpKqF5V1qUQIhALDr4Kyyw/mdLOBs+RsZLPHbijdPX65C/n03tCrSixlN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdh+9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNTBAApJEShxVO/MnMnaYlP8VtOPYvWFVkX+zfvIP8JEIBi/y8R0uU\r\nm7i97NsV71Cdpe9nIPOIFxqQDxzI/WYBHiBsMBTgToymEpE4Ni+8QaX/+J6F\r\nCws1WRsYR5+cW0PeqYBAezVszFDnw7ppInd1c5HG+zBZUqPpD1N1U4XcGFsK\r\nTn/cbJM4fj6whFXyMSDWUSRQDAE/hIKKD0zDbInB1FrnptjevAL2/7H+21JK\r\nbZ7vjYg6z50EC5V1gMgTbp5Cdu3iqLfQkqxm4XYc8rkEQRTpuCODfmCWVfTs\r\nG5XOWmkYvzkPW+pT00mkMYmHctuAiaF3IQ2ZRgYHbjDIN99zKKz1Dgxde4LG\r\n0nDq4MteSPVWP/j1joKcUJ67EEu0MfOG2mKDL7EnkVktRO1KSMWlmlPFM8qr\r\nRpbFT7oy8GUMHT3bxosSfR41eE8U3r9YWoHD9E4JmlldGANEN4OyrL4AeQGq\r\nqi0Ot0pUSkX+4vpuNLYUBHnwK6ri+rv9N53j5RrfKhW0/a4PZDw+AI3P6NM3\r\nvPPg4ZlsIQOPpdeKDHV2x4IbL5HWKfgcwcwjB9vd1irhf+RDfZuB4gD+3TDi\r\ncr8QwERdjHCctMnD7v9PeN5wElTFAultnKDxknfzk0EhdlADJMzbN7W2soiH\r\ncZLntJYnxjHgEPDmD3k7z8Y5/DzdGk4IKOo=\r\n=h290\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221117114840_1668685757749_0.3823476258859877"},"_hasShrinkwrap":false},"0.0.0-staging-20221117115640":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20221117115640","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20221117115640","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20221117115640","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-0ViDx15Go1+KvSs3fGxbb6RXg1RZsl53Q4nyPWIUQOMs5KV/iKTm9m7TxPvGkOAZwT6H6/LjynoBXQ9lqHg2Ug==","shasum":"fe538e6c81f2a836d3ca92e525c77b8b3e7f8e39","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20221117115640.tgz","fileCount":25,"unpackedSize":64373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXRfukrDvnSQDJtOxqCnEMyjmyjfyQ7ATmm10GTtwVuAiA0k9uAayp1wIide2a1tVXRp/3VMta/I+7V4d1fb//6DA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdiGnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2+w//amxSiCLwKS77sLDDnU5aQh+hM48s2Aqa8yGdvV8wnYfJSmYu\r\nc/zPYJ7Srxb9fHp7iJR3stmfudLJCUNW6vljaVv5BJMuy7pN+6tX8NPMypTi\r\nDavUtcqxtuJSJQkIDtwIDkIsmL8RJRmsgUgquPPgj8SlawmMTKJE65TMVhHf\r\nmjD3eGD8Lt9c/UquAo9pMc+ERlXTr5o/rQd0eqRH+KskpE5r78SevHzzaRcq\r\nGHFIOJnYaBicSA0dQVzEbyqvbrWLiv2f1Yb6imaLpDDNndSsVaDlu6EXgslK\r\nsklloYSgGmcoeOyzbQmXnMSYcl+CF1vZ/qmI67X0pMOWcng7YVgoAL+e0JMB\r\npsm8wKsWrG8PX91UvTIZaPi/+/DuczE3GV5Uc1YMtXOuN9HLsK64D8sh6Q9b\r\nMoU+qsXXwcXgc0qruxW9VG6RCzD5j81voLBpL3hdiAtegFita8jxB5bq7LhK\r\nVPfiQ0mDXcRa9xz+wbTidQfQHFrstPjzFyUnQDbVD9CH9G8ePDPqOAtFWN9m\r\n7EnC/ESfLe6c7l2ie3S2vDkbhgQk750POyxXQvsQLs2LmToe31OQN6k/HPct\r\nENToTUFyQ1bsERS2tObMmlgdXWO7eTGSsH9COAIuMFQVP+uFQhw4KHg+13KV\r\nqBW+KMx2FYgJqKRndkjHkfm8er2Nn+swOXs=\r\n=4my0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20221117115640_1668686247524_0.24663227459688253"},"_hasShrinkwrap":false},"1.0.1-staging-20221117124640":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221117124640","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221117124640","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221117124640","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221117124640","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-MN9D7ex2+T2zkP3WABmgiEc/wTwNM4BqSLTTCAsN/jJNJh9kib2m45ZqmB8RLadpq9LMvbmmEDPYVi2ZyLUANQ==","shasum":"74a755abe9ac54429e07e24943d73e63f8bb8b1d","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221117124640.tgz","fileCount":25,"unpackedSize":64458,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDnVbuSOu3PTZM0LL/lSqiGT/4dJYXgP8XfCT8Z3PnuAiEAk8QAc8Yl+oeOoPYZkSWkRWk2AOce7XBd5mjMHadp0oM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdi1sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWxw//WoroGwOk1bISoUkra8CP3KxGPBpeJontOjq/XMTMbQw6jJzb\r\nxHrI8btBedlJhqSMBJLTP0XqVD8fg4BwZNTsLk/x1wYsEM3ZKh0BkTFS5tmB\r\n29XJvphWCmjRUhytryXflFB9SvOHhY1gxs9BINSO1iO/XKuYE9Ms4sEGSDHF\r\n+ssnZ/MimvOif3zRxRGOMs0pGYInIDkvdmi3TNFvxPmS5hCFkQ+5+OH276/9\r\nsOILppzKCn8SuNJVl55ZAGOLDi9O5kWTeDdbnAjUyO4NBkqtLM8JST4nhx6K\r\nwWcS6tROjQb9X+902ve8qnB3HRXnWbeJ1nQPtezSfW2pfCnVyAKynuRBjsHX\r\n3UnI2DusNnRH6UTlsUyCc5mg6FH45AcD5DxVuPp1dylfvMFOPgj07NYEcVKe\r\nfSfiGbaiiTZEiNMEcwgMCejSwFro0Pl32KYdORi7ZLijDqigbY0UlYuokvCp\r\nExKnKtzHjBgXm2m4Y5aM2FQwSxr2mhFU+4s/TWpeJB8njKcGL91/4r8CBjOK\r\nlSEEDJBYxHveX2aMIk0yvHrShaJziJY9k0d43348Q+rjOzpRRAjeyOTqEBKE\r\n+OI3vfY2rr3lcXtfLMwzfHyTnrrBJYaHu7hbT0nZmkFx2ExyXrlhz4dnmEIL\r\nh4turgynn7lEKmiidcFHMQurNb8DS6LydRE=\r\n=iUtN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221117124640_1668689260277_0.6023115967936121"},"_hasShrinkwrap":false},"1.0.1-staging-20221117132132":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221117132132","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221117132132","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221117132132","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221117132132","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-x0NF+JoOwv/zDF8nbkw0iBC6qIsbSmiJ2/Za3qNgV8ZDm8gAoo2ps+OxJaG0T60ckRvhrlkKRlXDpWFJPyZW+Q==","shasum":"64e7e8e54b7a92b2bc0c3e9c85bbc83aa3f36fef","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221117132132.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+/A+zUsM/txJaWNAomJUVPjbJcnX1Lbrb3yCqn1epLAiBD2qiKC8sflc3L6pqr0YlXnGPR1ZCuws66l5jgPE5Omw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdjWQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmql9BAAiHSsu0ykbvROHQOLYkoH/rULCANIfQ06+HChnXc0Jof3ZU3M\r\nJ9CsIUfVxHSfMFce2yLLDNr+/B0xXrFhhquvIrinN6O11oxuI34JzA/mebhB\r\nLn1MKhQrA79230FoyJtKfuyCd+psQlllbZkxERo9NytzITUojfECMZ525xv4\r\ncIQmIUowVKp0rzxUAhoFXrn5/j0tXDCCeBjx3WpioSQi1UxLDc6Bpz4+up4K\r\n8xPnPJtzbpNfS2IKbiZBYzrIcHFwCKFU4jEamwt+G8JOvHUfy0P01sc/In96\r\nKdw2iRVnIUQYf1Qw5xdCDFAgKfXHvHT2GLDY4Vg4SKWaQtQeS2ASW6vkANJV\r\nfT8hHvjRdknigpyIZCEDRm5RYU8qTFOy9D9yHT/7M7i+zVn3QwV93HMlBRcs\r\nPSh+X7dlJHgDlUtU0BNi7hV3kQH8jN6QguYWeCfWxG4aMLuhwxndjPxGfS2C\r\nZgiAeF6sTbGK248fDC61lBpNj3r9+SSXeBP+zOVjibRkCsQC41uK4qYmFvds\r\nPf9uW3kThLeOZ7b1Bu5qe4eWz5+eVyaGixn2UCXoHvw52kPh9r7DcbguvIuS\r\nB/efvCRPidyhaJGwSNSlaHrnrkqaUAdo1dP2ANE439w7V/Gs5yZofuYNwK1T\r\nYwRcZ9fSDWmsqJOBduYGKDCntBdoJEj8JyE=\r\n=FH1d\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221117132132_1668691344219_0.767974337151131"},"_hasShrinkwrap":false},"1.0.1-staging-20221123105823":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123105823","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123105823","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123105823","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123105823","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-8+j6801Hy5GJGsc5uSp/B5NKCy82aRgrRIXuW8DoGiozIaLM95z1HQtj2qlmvNlfJiXsyFgNgnV+v03AslMIZA==","shasum":"2c18e4135546d13ca41264707c9d5ffa0c6acb06","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123105823.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR5NvipEtXBR5N5ElkRv2cDAOMUYl4FefNNxdeuh8PrAIhAMSBHOZQYPNk/5KlASGV7qAmIUFq1q1SPJFzpLOt0DHl"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjff0TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3nw/5AIQq0hTXF3z8hkHEdeHuo4z8NpYSXfKCnAy1vJD3n6bcR6Ua\r\nY4CfVYDW3Y8/tSPUHSJmF97ZQ/OQ2dA+xB+iYPieT3a6HBZ1cBzqus1BHjV4\r\n2exAAOriBYMFsJo345NySrQHVpqNllMIWY7ORHisorP/3wL60VQHZ5VPUuS5\r\n+AviqpkVvWUXVQLAuCw/HvC4k5C5wf2mi3ajUFGX5Tk8irKWmRJzVDlvCYhs\r\ntJCCQKFJwoWl9UkLi/pEBf97+/JsMYtG1M4HLFr3qvxBi8F6ioO9mmk4C6rg\r\nkUFBNafGQsypyjVJrMjulr43UWZmNO11a1ioAFZffdklJHORL4GRXH7CbMCH\r\n1gh0b/6Ch1LUkLmAR7ZwG8U7vbsxLMaVMP/4URZHw+kveBsgigG4+InVD+f1\r\nFFKmnUqq4lRDdxebO7dacQiFOO5MgdcNK0f3gN/3Qcxab7i1gtkABKfyZXPT\r\nyjU6kXObI3vC+RA95PNzb62G4ekcTxOWuuIlgLu9gD82dBIMg6PO15TVWUbs\r\n1Hi3BLJynoaOjS1N1a1z86A/R/a8nV/+i7LKqmFVrGM7+EEZ2sr00q5jlMtJ\r\n4OKYOsplR4FzaYZgYYEBqlC36TYPmCRJqCjuD70Nw/KzgXLGtRt3DVETdcv6\r\n/cH5xAEKSutsXDBFI8ar32P0hAjhfzkoeHI=\r\n=3u5w\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123105823_1669201171244_0.34375960878824086"},"_hasShrinkwrap":false},"1.0.1-staging-20221123114650":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123114650","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123114650","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123114650","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123114650","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-/ThZ1aSrBvyHOBX7uFglagG9KmiSoa/I75vI2yNFeSpKv7LXZ68jO1BQsSVvRFHwAaAR3qRuUCCoiOYwUPSOCQ==","shasum":"f29333d50e225deb11b37e82e537fafdd65935e7","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123114650.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/GDEJrWEYF/dErk4JTj128zQzGMq44iMdcKV5PYAKygIgEQEsfupXWI+Qo0dCxHAomvsn/V1PumhyARPc+EGluZ8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfghnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOwA/8C0GqJlH+ccIKLqAcvrv5clle1UXbUNlEJGN0P3Mh0y8ATzda\r\nIkdilosChufvW5MHRpOzn4iYA4bETVpgeXdC7od2KOt4oc1hODU0TMvDrs2Q\r\ng/XKP1nXQ13XsZZlqwl5V4rtFy5td5X4nZUAdh8XJzg6PRAzSUaJk/KXqLPp\r\n4/eDk37aDxV5EyCTs2/l3vjPTlijK2LlJ9/p2psKt9NrU5C1o7Cmf15K2xgl\r\nmNoVDWgf4RChipdK1G6cIbuW9oszbOqx21l80qwxudlN2u5OpQsMKhLCO05o\r\nSMxmdpNnxEoQr6Xwq3ndt4jQIg6uOIozcY99L9JA+XFwVvf6cicl1UenkQXw\r\nK1rA803tqe3/Lcw+/8XjiE21bdeGhp87vPZACNvpBDUiotqgHFPrTu6Km6IU\r\nykVkdMkKZI5b4Rs/0cG1o7hVBQ+QmMR08eTDBDNSZKMcFdt1CWnfMLWh7pi3\r\nDwQFSZJHvUWQpxfl3U4Z5Z/hiMMsHw93nIWM2BhdOGI1gR3vIEmoe7WnttIp\r\nIaUVdr4MyTefI9comdKd3q2o9pvxxJg93STWVhIbnhHCFhZdHD6MG5r9/lbi\r\nEJBoMY+EFKWdZeEr9Jalx7rlbk6oRgZou36Rj3sxbgntZ/iI0WkmVRVM4taR\r\nGUd+lZJ7VFJao7u3CwK9HrAWRbabJ4CFwVg=\r\n=6rfQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123114650_1669204071692_0.599222454943455"},"_hasShrinkwrap":false},"1.0.1-staging-20221123115753":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123115753","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123115753","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123115753","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123115753","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-gJrAQ/EmYL88O8SdQUJEK2q9lyOTW9yYkglCQPmxtleq6TQYEnAHJIhzrvL/Ib36SroFV5R4X2LvHAkRG8wM0w==","shasum":"be23fe654fd9c0516d1a1ce4a2b692ce6a33c80f","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123115753.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDJyBI3r0n1rhSqZnUauzpXA+JgIWRe2QptI9WvKZusQIhALdXi3r7nLCb4qbFXdW3WxNigCVuIaacUae0zq29mAX+"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfgr1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSqhAAiQVEALXtMkJUPheuQdZWkDwydl8SFD8dPl2Jk0oEAo+VxFNj\r\nJCpons2JjoVvtX52bdrQQbDxk3/YqdsM9qakyyQgWVp2JKvvsBNV+7LT6Y5x\r\ndrjVhQ1f7VFBn+jZ+MTLWHRIer6+V2Qity7c8EW16/1PR9Xxj2I8ugymIiLL\r\nyFrVzV9v76aXDT/ZLTH9e2SC7WxkD6uWNl0XfO/4Ls5fpMH7Z/caVD5aKO5B\r\nxPhk7IADYqOtq8xCU4uLiexfVQ6P4E8JaIJpUPa8rV1AYKWIrTk+T3fFv4l9\r\noC3QQOp53olsxsRkR7hjc2Lc9hD/arZtOfEmURlltgXF1Au1q1Oax0FD4fcs\r\nMxR9+xX0UHJDEmuicVWuoac3cN4Lhhr4IJj/QzexAlphqeAkJioxRv5rcWfS\r\n586/Oi48UR9kVVf3vrLJngmTwvP4I2LoMDK4OzCbRmH/JYyIyKcGoNvnCtaq\r\nicSG0CVvXCUPkf5+GXxsS2gaNg8jQ1DCU92N2mDFWqKHNKLJf8HevVxL2Aah\r\n1z7FKzBwndN8LoEbfcsew1TGMvLW4AEbK5l+QOJNTUi6sRsABVg1YVluzInl\r\nny51PaygpKa0er5jMFyns1fO+GR4YgtG8o3R9He6nMOG9WFQL7TDPv1ZzQaN\r\nHFuQ7/UovA/0bBmZiq3zPQEfc8coHGIqgbI=\r\n=fSnb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123115753_1669204725228_0.21240339346658366"},"_hasShrinkwrap":false},"1.0.1-staging-20221123122107":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123122107","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123122107","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123122107","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123122107","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-2m5H+nLdGS1469bi7OMyKDx1TtlQ5lL6mh0WEn8oqKLE2iW040Ze+K07uZmWGabrW1XTqqItEKC0AIZNQy7c3Q==","shasum":"107af7192b15b758348b35b66393a86fcbdfb1e2","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123122107.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4lr04IsGJvDR5+eQXw/VACKlvQLsUwfDQbivkdxs5uAiEAynYFyYVCM6AegzWrTe0jLzAFmQANd7GIwOFHcN3KqIA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfhBtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGIRAAmAbQJW1lOf7FmRgbmyXOq+MazW0oyQ4ZD25PMRDQ/F+gyv86\r\ndTpikP+I7NHlkddFyfob4HIQ/KSYd1kYbC4karGKLPczejJgO19WzVWGqmvE\r\nb8m8JWBVPD2R84RKHGSilP14WDCort0PJLH9UlPsSW+lc7mVauRBmmokhBfj\r\n/SHmezIqI9fh/el5Fhty0ALqINM27VI3sPDJeQFqKBMsTJ8NnU+DGUiQ1jIK\r\n0qjH6Fz691f9T0/HYq+GKA7TnUv19N9RHm+GFxlD5Fmyr+WdbkW+0+AhXQNu\r\n8yCCr3BG0ywiu/C8j0fB2Etz0yXB5Pn+5BcS4rjPXdY2wJa4RgvtV/MOCXGZ\r\naZcmNw6dgGUsNT5gwQcqtVBOXrxF8fn9bTIJBRJC14FLLrcuRxj4ZzPDq8/C\r\n33eO0tak4w0ihhflqLzgE3zcJFiyHhIWr6oaPiDkRmigjMCK+xX6Y3TvuLiE\r\n9afJxrx9jaTS1pFSb8sJR8C6krEfKk0zw0Gt3EXGnpLE38D+TMz9qdLrRDYh\r\nPnYNUQHiOvDTW6bbyXMQ58fp9l2/8c9snY2plUBKGVwzI+rvw6LxgAvDi0ZR\r\nh6tm9Yzbmz5VzqR1+WC4e0jI3Ouiuas3OOd1K8mhoC2AZbGAOGMK7FNTrQWa\r\nWnIUJL/G8hUAtBZ+KANci77SdhFP2NBlhBs=\r\n=XKKL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123122107_1669206125383_0.3996449211042956"},"_hasShrinkwrap":false},"1.0.1-staging-20221123153837":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123153837","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123153837","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123153837","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123153837","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ZwdD80WJUOPB1/bft8LhTiWjeHKDCbj9sMeJ9Hhvd2Gt+cnGjY9MN92eu5ZsdiBA8mDS6INWYvd6ObwCms5iXA==","shasum":"59912445ca27ab4fdebe9ea34e35f1a6c3b92490","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123153837.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3M/nxkLZRiQWtZAKCByqvY2uiItdppEQyCceyVggxIAiEArj42jhOcgtwpbVaSn+9twohW5tciQFYlJZRiXnfRKxg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfj6zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/aw//U21MZr2NM3rUBoIe4UzTiyc/iNSscy98esPyMOnWG7GyeKsw\r\n2njpZeMQS+T1y2Ps2p7afBy6sKM37z7fSugOk9bN1tua2GeiR6GM5ebJoEJK\r\nvclvPEh1E7EViRIGLgUSjnaNvsgkexUczXBRNEOg0Eu56YOIAncKoDKmdDIX\r\n7ucbTN4HRRkg6O2qfEpl+IeLfcQWZBC1sd8wdqOmk+SgOKelYQLriyIWLa5h\r\n+ZjVliNPTdmR78uLnC7StsJMSncL905mFusXlGeuncG+MWXQKcouj7FZsmPo\r\n9xMCKV9Y+Ad/RjW833Twx5vUKjCWWYFxbx611ZRDr7K0XsJC1d5kH/kTSCwh\r\nIn52vzsaU8Fy8kB4mIqZ487K8BGC80gfuYiD00rZHbq0aq2p6vaV0LUnSX1/\r\n9y5tGa5j0dOJomtJc2/M8sMjLtZsMvgsmMfwyIEmDdmjyMRcHqRpRyHMWjxb\r\nAe1TqgiGSXrp530Gixp08SRqRCuaYQntUqSVz4rZ8G63/yDk5xTcJoALzP7D\r\ncYXUND/ZSfjwUgP2F4vOd4yTqdujX87ZE4756bw7g4giquYxmrcg6gcWv731\r\nRS8JEst57Tka+QYmWVmPBp0mLV6kk8aTii0Pc3WAbBJfi26bU85Rv7A97/Lq\r\njscTwrMPNDVw356wwVql542KOOLbUomolPs=\r\n=mVYY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123153837_1669217971201_0.32893677672846344"},"_hasShrinkwrap":false},"1.0.1-staging-20221123154545":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123154545","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123154545","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123154545","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123154545","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-RdtmyyTqfF8x6UqrxImrgC4Bq0J7tLJjH4lbsNba6ga8Gq0Y9XpG7y52T6XbNPAgmcFFpWcWXRtOE3j7oFViTA==","shasum":"9d99377621e524fbdf52f6431e7ebc8011c11f3e","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123154545.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFHMxQ1NvSmzqK7jugI4ufRNIuoaX4aCXKO7xv8pFtS6AiBMbPH1fmhJiIYKcbr8SanwQEOZwXzKHp4wy+3F+OtqFw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkBcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovPw//ZolcO9ogatyGKqpNhuEGtlSbOHTCby1OZ3kAO8FhcUo26RE3\r\nU/6PHV+bsVFYHTSDDxeWYUqbj3Bxvv+yUslS6eh73PZbv1PgU6tq0HbRl3Qj\r\nzAUhb6lQUapLcduT/ljDYSDDAseRWiHUJEpgygGTt6QQJHVASJ2SA+ityzry\r\nvXV14EcP8Uw05BRchQhPVnP9lc1aeso86v42czIbaSvxcPCLq3XICuW04tML\r\npKovPX2Dvf8Hs0ukUWBXhX/NkLbbLut9dY0R5lGPFC+rYr7BXyiT07YrfAGA\r\ndEUJoj5RMO74sGwIE+DdC+SjTvopKSQduN71ycaQhjkzigZoEAy56jtrxA4r\r\nj1aqfUELvLCYH1TI3p/KmKY+JXDCxlDftQHl5bmKORcMAiEQFNHJq0Dz8pMe\r\nFbrYF6PVezQFShpfRsJ5Vyad9v07IxeRxfXZ/YeywkX9wsyZKwUa2cpfNSKr\r\ng4mhFv6CckEz0ePgAuYoYzkRHpF8dTN/IAwGSaL9mT8lYuy91fVCtpycgHyh\r\n4eonBIRnnQ3CtaGYCLvQ+2YZyLzAzRWnmUgWvR47BOgrbyQXMaupcWEqHR11\r\nx+49SLizCAwMk+YCuhrBu0iVYwqu7HRA3cFD+39fUhHbexeBAQWxhN85pyoF\r\naBNdMyAeEHjU7p0+bQUy9fOjrjO6ZDen2TQ=\r\n=YPFt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123154545_1669218396105_0.3591700442485859"},"_hasShrinkwrap":false},"1.0.1-staging-20221123160311":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123160311","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123160311","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123160311","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123160311","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-n76sGh6ub+JGTSLCVxe5Urwyh3dZ6QyiiD80w08X1zpC2XY+qXQ3iJAyLaktMA/I04fq/Z4k2I8YeDZUxkls2A==","shasum":"9d7bcd6915a970e6c0ea02211606acf7a0b2f1d6","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123160311.tgz","fileCount":25,"unpackedSize":64556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNAeWfLjhMHpMmavk6d/6boTqp8Jtwl/2thSjknbaRvQIgQTk92dCgGmrWjmk9ccHsiDjJpUZx7U0ixZpPgfFL5Uo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkRyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmor4w/8CeF4Rwr3BN1BqEZAxAWtBYzeNTEy4LHazb+J7UcysCmBSg4D\r\nAkVBGc/TlAbNFKymSvR6nHT4Gj9sEnEAkCu07Cx2ZFUGiU3ICH4wkZZlB4ZF\r\nkqYnYSsz+Xyaszo/rkQ0Ri3v2oy93gpUN0LTBCDvHsfIKVxAnfZfV++LpOtO\r\n8lBbL3SzV34TpQQkVudgYkmbgk6ibLzLrysao35cNPFqrV4Bpll+AlI9xWBd\r\nQnsskx5hirkm7IxOSUvoZYYzPEWYGyPuc6WZA4bL2m7+P4XfWaCBpsTqSuTh\r\nC3eCsDYfFIXHPRssQ7zSd+IcCNv+64BKsOQAlTq1FS92k3uN29sRciZbJreN\r\nbjsbAgHox69ARkltm8dq0nKT7XrpYdUIbI8M2ap84m1j6HCokm0iWDC0xbCr\r\nbsIgvabzq5TBE9npO7wuXu98EHk4JlBvYI2BzxPQoZd/nnvJF0/936Z/7DTI\r\nFOEDlID3RxZVD1S4FdsadP/7rPe5a57yF0dkQqsZP1ZMrDwDYe8pSwTs31iI\r\nrB4VHFNufgOZ1B1qOZTFj+fDTurGKloX3k14HYiZjxrXka/iyqt5FwecLZ/x\r\nDH/uHfJEhZjQ/StEw8CmBTN7ZdGKoqBJGNvTkyoZ9Ifmfa10ylVJSQxQsJNX\r\nZnj3YGQO+YaCY21Ezc7qaMO6hxKQxJ6l7Ew=\r\n=Nocm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123160311_1669219442381_0.12119360311976046"},"_hasShrinkwrap":false},"1.0.1-staging-20221123160829":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221123160829","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221123160829","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221123160829","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221123160829","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Ms5/pl9rIn72yc2j6zqRhPEK/wjE6/4nc6hb/ZfeZxA6xYg/sDlWqOdi1wi2alnDHz8HXm0rfOBO8Tf1bvRPww==","shasum":"e1a223166690efc92d2f03f2627528ce99e0995e","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221123160829.tgz","fileCount":25,"unpackedSize":64654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxqZ5E4MsAEe5/RchwnoroKJ9kV+Utlppmy6EbI0TvdAiEAtcd4VKO+Lyx4pq0rhw/Fk+46wSNiaRCJHWO2m0/GNHM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkW5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopWxAAjV8xQmS6IDYMLlAWljg0qwfK3heF6D/INVkrkZxFLaIsRWij\r\n5vbQOGxUsVx+JXTy0hnTwGwO35+58HEQU95jdB+ERSaqpbMFcx387w9szddJ\r\nE9QsHWTe/R12JykRzbBCe5RreHAG/0LkrQXlABcPSj9BcHPxFtTV3BQAd8Ir\r\n6xZglCUaljhGZ1I5fRowBtk0oWxB5+7F2140ffl8gJiGAUV1+zG4rRd0duFS\r\neILI4lri1XhGqmnPemb+2Jm1HYjeCRyorVN7hGdFzYrq2qpS52HvF8QFFtPD\r\nNlKisEeRBuzOVuDlY0YKVcdO72ZDS4pm1RGx7Jv4Fonr67aUNzcFZqbpbdSB\r\nbLdULsHB51IQASQKu25LiQAhbTo6nLPrxbf+B+3s4+MX/LgE/LfcTv69AdFu\r\nsHgQMunN3KNF20k1u3rp6CGzrH29gyV0UvaEDkULbEBUYXfbz4x8EAXCJJvl\r\npXg7IwBlcV98qt4ND6rXco93wbRChr6cEXpk/a7f5ekjWpzaJwmbmjR4uN51\r\n0+J2WP3Fx5IXs2G7NAW1wGzwkMKAY8ukeDPZ5ZCGHMBdYnon8iPDKJkUlZxw\r\n7H5969B0Wjez6DaSl7AukQg6Lcz45uFlm9D6z8OFCCEXWcFv6y7DEmHFrngz\r\nruVslyckvRS9Q+ZzZ7EyGz/xAuy1GuliLfY=\r\n=Cyku\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221123160829_1669219769409_0.3667068614282958"},"_hasShrinkwrap":false},"1.0.1-staging-20221129095119":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221129095119","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221129095119","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221129095119","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221129095119","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-XZFXcox1r9RuMu6oT2ATn2UjD2Q3uBwdYXQkRaY/KnNui8jGj6rKksJJbspdHX0PEg5sidghJUzli44hszTPGw==","shasum":"84c5cd003b5c2e06f838fcb9e52518754e780fc5","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221129095119.tgz","fileCount":25,"unpackedSize":64654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAydgy1xI9UmzPCjPvPip4iuDdPz3avnfU86H5f7Dyn8AiAMn/7p7ca65bq93y0eHCiybe7dk4VhLXutY71FsNV/FA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhdZeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrgxg//cXHQ7IMxO6OyDT8GA+C7GHLP8wmcTui29KQCqHYSWBPsEVk8\r\nN3GRKkoQKilg7byrtc3fpfd2qXCpm8SIh5wsUhtayLqu47kx5tY99+M25G6s\r\nkXulB3SIksZEXEo1klcGajrX+Y4lxurGuBzjhpPgmEIEd7yu3R6Q8J0K9yzV\r\ndjoPIl/QDR7V8WiLma7iurAWdgitvO0Z7G4WlMx1fbe1dfr0OkXZV6ULDocE\r\nhNT8iT/wWSe5v+I3XuB5aPiZIXbjxk/KDf/fXUUi7xcvErEmFgmHFxopXaCX\r\noqS89tq6YM/2ocStiUbZijvfAhObERK16IzbYczC062KK8RG6MxrIBf+7P7b\r\nUX2cmDhKc1SXhkCKlc2/5Fuf90ssAjPgfd2uHgFc9uunSuKFUMxARFXnR+Kt\r\nL1jV0G0QBv6g3ccHQnhZViEzMNiGFmBeEj40DKnZzdgCQ3+F1OR8jYp+Pcvl\r\n5X/p39UMWLGhQKKQdVPWtHoIkcG4s+2T5j1a+0qzx3sXyHpMKWkuZR3lesEO\r\n2kCEqN5hUjCEDAPZiZwPgHfUtWWv9F5ZrC3LxLPp01R/9rd4MLfwnfHeNkoq\r\noGAlMC+Ar/mcj1edOxGSmXqkCU14heU0C/Mz2z4Oh3S2jsB8KNb5Ss4FQBIg\r\nxeeuj6oqM/PfW8zgnFvTCTrJVFqfuZr88iA=\r\n=c3ly\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221129095119_1669715550291_0.8064666448213711"},"_hasShrinkwrap":false},"1.0.1-staging-20221129101347":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221129101347","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221129101347","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221129101347","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221129101347","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-MbhFx8MdFQALMt6anrd/o2vNdfE/PoR54cgl/dYnLsam+rqgOJPIATh0Gc6v390CH6OfOU79HzePEDbabWYVSQ==","shasum":"e09d0ddc99c207c2a5e86d3784b5eeac139e3a62","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221129101347.tgz","fileCount":25,"unpackedSize":64654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCV/53oQO1j1/0RiRA6sXMwHVF3GwlCL4JCPPVGqT9EsQIgdyIAPWHjDH2wIcGtwGeD0uwOIa2NWDW6YHCder83gag="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhduSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopuQ/+JOyQ4PybS6AxwBno+uEEvkknMyZ5q8NXyW01Llj9aHHvIE2m\r\niVjWw43DGRFojJvZ+yjvys7LZNoZcJEwuMGd4sFzN/UtSUnOZE/O5TXTWyy4\r\nBspAUGqMSCKqG8t9TeRTSUts+UqMsJScSUvi5QG7nnJsbYz7eqBZrFF704Rj\r\n+O7MnZ23ygPRbdGJAiz0hBqg6mwwlmtz4Ev9clyAVYPixinLNmkc01Y4OhzB\r\nAFD5mY84nFvQML7dAT8To5Zb1P+eZ/+Gt9qs28Uug/02NAgzuTdqcHkfyoul\r\n+ZkjhXCySzOWJyjviplaJqdU9UswQN34P09YRpsQydwib0dXhr0NwggzV6Ge\r\nYg4Jc4qIxBLgNeaUh5wK24OGnN4DgpMHdFe+6spriS9Pbxf8GxQqVro2Jx5t\r\nqLT33+4ge+pn21MkJAd55DnMBhfMbhxyGcKEsaLUVY9HmyC6yN5ryrNWrdA4\r\nARPhlekVC4V/XvN4TYaiwGoxQoUMZkSklt+jfhvWTGouUN2oiRLxIZAw3Raw\r\nH9uut03VnNXM6RzgGfhoPxKL/GjGaH89JcyRmiC/PqWyhQpc0yqvUt7mqQMS\r\n1x/YyZX2tTzz+3UBRapxXva0VvfvDHaU8Xo8EobW2x3zG+bk5nlQArLosc2+\r\nz5S2zzDTLpCrvaS+r2oVYka26k5odWZEzG0=\r\n=e7Zx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221129101347_1669716882302_0.24230267522077598"},"_hasShrinkwrap":false},"1.0.1-staging-20221129103019":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20221129103019","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20221129103019","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20221129103019","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20221129103019","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-B7BFD5TbrUB6rqPmvQ9yEtm15o9Ow7K/5JmZMotAWwr2LydmGMWgHjGtlIMx0R0YRkh+4iS/fd7Ke0CFVJk4xg==","shasum":"1aee88c08b228c040bfe11ee79929527a336beee","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20221129103019.tgz","fileCount":25,"unpackedSize":64654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr2N7rgVI2rv7Ydqx1wzPeX5Chay7gU4IdwXMcmIyFSgIhAIQtrHsMD5vdwpuIPdB9n71pCx7ATuXWBXeomRIWWU7h"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhd94ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7cQ//dTbIKuxIXYREFoiyXn5W5Et2ttkq4fZ1CWzaAudS0oFcVXdC\r\n6bBHqWf0uiSWPJZ0TfGlGx5wtUk3CZwRO9M3q92fKNNpIpdprSZO1B6GKUQj\r\nXJBF1C1s9IwxOf11F7rd3kIvV4FdoP6DiqKkNIA+rNmQ8QmiaQrXa45Ww3yG\r\nFV9FWFYHEKyK9lDRUZy1IhzZiz2mlgCSDAsNCZFn1g+XWzNccBYN3MPMdCUR\r\nsqnNT4xd9dpjdTZd1/jIXkG4wIlXH4EZXCfFLaYKBNeeoU0nMrB01veWbVi+\r\nMR/JM3ylfbi2DzOQhW6L4adIcIf9UJ0pVJdlvT0nD4HazDw/eIHVIbvHHdBK\r\nEPK0FCLuNiW9awTLm9xMC6qXR4mcFM6VQm1mmfG4R2RWgrX9yYuBS5+zAivJ\r\nRZ7D0XjqEVRJ6/deiwKjo8E6+fo5v2gddyyLU5TQ9gkA71SFd2ZFTPCv18ok\r\niFG30d4RDeu9n7TYG5V12RhDKAzo/HIE7elvJryBCWmtcS4SHgQErkcq4Riv\r\nY2AQYf6mkFUjgx/S5K070OZxuFovnKYrWtXEQPfgAEWZkfdJ0pdsnod/f/BP\r\ngbk0Jhz1a2idWRkNwr+dNoTD4byADPyz3l9Yg48GYy1S95uHFSGYsYa56Qhq\r\nLfyD41x0eVwx92mjWkEcYxk6s3gsDjxG6eg=\r\n=iYPw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20221129103019_1669717880588_0.6304371805765572"},"_hasShrinkwrap":false},"1.0.1-snapshot-20230111104551":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-snapshot-20230111104551","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-snapshot-20230111104551","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-snapshot-20230111104551","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-snapshot-20230111104551","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-p4z8JxJaEOBzb6r9K5thETQoRyq9/rPwTA+OcoX3P7NqHeUpVIfnPLV6Bfn62U29IyNBSL9hMCECS5LH1Ihc9w==","shasum":"09257028add3accb2798edc42bcb1f00cb6b95c2","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-snapshot-20230111104551.tgz","fileCount":25,"unpackedSize":64660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeGG2mKilGqjzGMGmEfPJSKfQQ7gY2xnzWn4UQLwcJZAiEAmm+YzatGPky0IfxWaWQVYDzu+52HMHqZ5wwQIn5MnHg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvpODACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsFw//S0O1u/zC6IVsNBCuDrY7syL3x2QAph17pSO+ExUlWH3kNv5V\r\n1Rc5DvDqDst8iN5NtEdaP1VSc9m1agTTw18/dYTMdJVZLM6XnpqbTPr0NaEe\r\ndnBCV/xAx3HJ7P3ptVvlueraO1C9XSjscQ483HDksBXQixtHpHCurKThjsLm\r\nAAh3upEdzkSAfF16DVLcDj8HScXvwgQN9Okxh/QCGpN6GK4X2m3qQfDJ+eYK\r\nGh2NUCzPnOiGE+PcQRXhadxQj2zojI/VKGTRxkjyHDHEKycwrvZVwlW0T6oN\r\naatfggmpnF5xE7KTyRcfCSRQSPQmM4dvV8XQYV+Hqhz0af3WJBPk+Jjj7ewj\r\nA//RvB1OlSAXLqZvXZnYbSvadNM5+JL/IInXQx33LP7ogOd7tohMytmGaWuF\r\nV2FLRqBuXMx0Y1FXrehyx7g8RDaSFZSLw6Qov+7E2375IXiH0lYPxKyK9uzu\r\nZhGDNPWuWVigGdsdPZmTGtaVZB2FKP41TZHbUvxaNXPvJ919UCtVLjOrZ8Fo\r\nwzDfWpnV7R0m8thM9nayT/acPQRlP6g2oO6RMKfdCuJOHXWc9Pm8BzNdyLTy\r\nde50FMvHdugM0EGzO1jmEMZeBjiajWjOaOOOOxwAR3yVPTyYLsgH2gIsPyJY\r\ncUrEs5SWLb/FWbXDCPMx0Bxd9ofpuUURtYg=\r\n=LiOw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-snapshot-20230111104551_1673433987545_0.9765540697515016"},"_hasShrinkwrap":false},"1.0.1-snapshot-20230111105607":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-snapshot-20230111105607","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-snapshot-20230111105607","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-snapshot-20230111105607","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-snapshot-20230111105607","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-RVNKumCJ0YpGXyPPZlezybUTUj9ISR8Y7bV9SY7oNcNxoVNmQfDX+mItScsG1YBUpuPC2/xCCwbw6PiLEmUVPw==","shasum":"d8a521e818238556654c92694d4de3d285b3558f","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-snapshot-20230111105607.tgz","fileCount":25,"unpackedSize":64660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzO+LclpMRCG+CSbdx/6SJ2eFjw9sqiZKs2xujlyos2AiEA8E/Che0LCe223RaatGgliMBT1IVWfWpd0fIRTbPIIiQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvpXtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkUA//SQTFVCM6UVZOuZLndqbIbqV2jp/ClbCZA3aC1Lzor97tauOm\r\nXdgymoc7t190ZGkrJSbXUuwILtBVgKTa/Z9exNr8UEi14IAq21kU0lfSR+MU\r\npTfAA55DnM8UULg/VFIwd472lsw2UeFAp2Geqw01VB5y/oeh8Neix1iRX/3s\r\nZrWIuolqky3jblZo94OTURK+3j+wUdwEa3DXtTt6RqisbDIXQFsz3/d91enf\r\nHjGzmFSAOz51NlA1oeq6xZ4YkKBbiAA3I1cq90XF7RseNPW6RH3+sTTs/ZKc\r\n/Ks9p7KUzIz3RE8vZEg8TbBN3j6+4u8Ke2WNO0iQz5/9iHMFABFKP8yFUGUl\r\nSvk1zsK0LYGwQOktUG/saM+U9/a0iB4WL5g4E5pvl3vFMY5apCMUbLoGzn2r\r\nL3WKre0UtQPnB1nHD0eqR4emvkY6TSr5q6/TTMgIL/+Z3ywpQXn3glPLH+3p\r\n35bO3550t2gBjnCNKzob5iQPH5D0VcwmCGMAKZnqsAhWzE3/d50k8WLt+oQ1\r\nVQF+ZqnCZqTaOuqr7oMZOTdk09y0AuLjArBKK1BtE+G2ZUmI3mwbGmyGL8+H\r\nCgkozX114dGwVA9EAelcaaHWmvT2meBIFb4HePE4qsSB7V5dVDJxyhPycLJW\r\nY9d1XpMzUCPWJou7Z5p1YcKMo+sHW47WHN4=\r\n=leS7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-snapshot-20230111105607_1673434605395_0.6425483717893723"},"_hasShrinkwrap":false},"1.0.1-snapshot-20230111111223":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-snapshot-20230111111223","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-snapshot-20230111111223","@pkorsholm/medusa-interfaces":"1.3.4-snapshot-20230111111223"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-snapshot-20230111111223","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-snapshot-20230111111223","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-iKh86A99xbLhihTuGSuKcSVnrjL+7OkyvkFCkcbpb5j9oC4MSQ3ECX5u8EvzE+bx5XPhApmM6o1j8mwaMB5B2A==","shasum":"1e6bd5af65817dd42c5c0226230ff480c7a289e7","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-snapshot-20230111111223.tgz","fileCount":25,"unpackedSize":64847,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaNBWVoCiE+aW+J+oiSTiP4sDjbrZRUl5xvC8qTCr4+gIgduSATry36D74JfCQx8jTA5FngP7arj/uqJAtZ5eNEpE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvpnIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpi4A//eK81/p9mJxQ0OF+N9e9wGIxU79w5xsXS1Xizd9ueu6JPoXqR\r\nSFZvLLg9qvLCpW3801bOVACvlY5ebubQbgJe2fpw/nEUDkjHlaADFzbFJgfD\r\nBH01fkpwq7eVNG0ninxOQkwF/ueF+Cxg1PhCxfRpJxtPBUqs1teTTB6rJOlM\r\nXUnaDj0kYV/poc16AhJAOjp2nBf/9CBbD07VGTyE/IYT99XZ8q8faBLc3CY1\r\nfHvYA4OKs5rQGfVZs5/JfTIQHKOu52wiIHgH9mJq5Nc4Am7K9BMzss/ixZLn\r\nwc9jLLVc2XcPXhbzD2ZLspyIsxBIxW6UAqTUaFTEuGVmYL4LyUkBzEka1p3S\r\nbrZQv5D/ZemCi6VdQzTd+4AnmXfOoPbB1Iey36dKU8PeO3PYNfUD5hPdJs+B\r\nXs95Nf/7TAVIua2r6z12M4VPt3ThvlO9QtUrmHGBSjRlxhgWm1CTCpCnoN+J\r\n1b3ZAuGAMxP0CJ/cygIRF+PXBAx9iGNQwGS4P61T1k9KebiIqkujAaNuhoIi\r\nKHSwDHeBywBVj01IyrQEZWOpPoHh1han7KLtBOaWbvjFjOSI+ZsqUtYPOXXv\r\n+EJ6rjFMHjmqO4/HnmM2+859pjYcjHynLyoIz+wjS/Qo38wwNOQSVRoR661Z\r\n7gNGRZciJMmyVnVDy2CU+CrqN1Fq38nWp+M=\r\n=37pw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-snapshot-20230111111223_1673435592741_0.6452366056235355"},"_hasShrinkwrap":false},"1.0.1-staging-20230111165320":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"1.0.1-staging-20230111165320","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"1.6.2-staging-20230111165320","@pkorsholm/medusa-interfaces":"1.3.4-staging-20230111165320"},"dependencies":{"@pkorsholm/medusa-core-utils":"1.1.35-staging-20230111165320","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@1.0.1-staging-20230111165320","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-j3ozgAKC39kTnX5XYN+J1VUyZ1C/KT2DpjmozcFGjZUTH18OSKXzrBQl/7YI7tRVungsb22dq8UjFzmame8swg==","shasum":"715437ecf8a1a483af3b7de0c718f8e77b75d9cc","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-1.0.1-staging-20230111165320.tgz","fileCount":25,"unpackedSize":64839,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzkUsFuv/82tUBDfhUFHnHhMSmpGYYKYuEl1d50PmodwIhAJPF/X9ALyqZSNvdfykEC6TO70UYkJoE2I8zYfF83Wtg"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvunLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9Ug/8DCC4/A+0UhDSUgHR4eMiOlViLn1ROrVsF6OIANveeBJPs7yA\r\nfFOef7J5eeCnvHkdJCewXayo1kjZpM7N9YzUdxKVgx/6AMMuLrWAnPlHUy6C\r\na85wN6fZOB4LknrJmNbqkYQ5Q5ehAzCVFzFDUjV8GwR7RkWbt11337fERBwX\r\nLS2om1ouoGi8roMj5iDJsBmOH/MFz9kWk1NB1eGgTfullmGv9EU6azIfTbsv\r\nmdA1siBYzeEbXo1gVvTXKpo5gCyatjx+JKdjOeZwX+RND7qCLx0077+zpOpx\r\n3a60glUrYIvRIhNaDY9vpXLHUQGJPA3sJuViNxS73WelUBjsj5ibBUWoKmci\r\niM3y9+X4Z3fwVmcKFLPv++gvJgk36yJWliRJllKviiCR7OsTj2cEsVgs3Oyz\r\ngF1t0R0umQq0yjzfTOust1nVoZcLsQl4Qi1INeYZ9wgMEu9KAmGnyMaPoCIE\r\ndQJP9V/PC6UbMap8NRgMYahgLpbUEmf5pfZ02Mx3eRbIzOhubfwEe/97x8Z1\r\n8ul8yIEzBCTAGQBw/v0aU5JpIpK7uIWyumYxYpu+7FZlGXg9JHDB1o8wyuL0\r\nXxFmM6r4fqVgbMTEo1CG3XUUpQIZuk8opmc6sgT4EUPaAeUOEcjwzIqQrsWU\r\n9I/WSMVgope9yUbCi+EmhOu72YOiNL+jMTA=\r\n=FTFC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_1.0.1-staging-20230111165320_1673456075290_0.49227542226901"},"_hasShrinkwrap":false},"0.0.0-snapshot-20230113133411":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-snapshot-20230113133411","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-snapshot-20230113133411","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-snapshot-20230113133411","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ZoMDYZwQ6YPM7+jKcWhTaGBptGk25VWEyKbsUjclvsTHk/JiY/beRfKr/7OfJsFGI/DJbROxbKmfdI4PIbg6RA==","shasum":"07397b37d89651ac68a6d81097c0b254ff2eb667","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-snapshot-20230113133411.tgz","fileCount":25,"unpackedSize":64377,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGRNUCKBQcx+xslQILuXWKKpdgicPWThivEViWPCuhuDAiEAzzTmWYLtr24YxxUUwDc3sIElQUOrnVwbng8qxVuq7w0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwV3zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcUQ//cFT3C1EAw6ZA/BzdukL+Mb4YjDbabzAydh8x3BqZxMhIyRwV\r\n5gCfg8xp2rso8lAvcml6MW+fi+U1rPr3tY+ydmlOWJl+edyU+HlIDsllMJDg\r\n3iA4Om+9VRR/UBIGZOcIcpVS0iDWG7fPgX+MukwLvv/0YdrRfPZbWi1XFMYj\r\nI+oBb1NhPJCQHN3zv3kQTIhzqIaYWL+LENrAo8Xj8ZUENinjFo8xrrku93ex\r\nJpRJ5h2+CuOXDHLME/uYAERrO29tzzlnLTfliRS4vFs/Wk/tjAp3nVYdEft+\r\np7oT4T/mhuncQh0404egbu0v2qh4qGrFBUpNYzkKqNxbR5FQpAzhungIExG6\r\n5CgUApVFzoEe9b6tkMQ2nCirRbuy/hzkP+Mw8cVUnWMd7Q8I19JpoBzscuwZ\r\noBjnCh74WXvQEu5Po2zYVsUCfoT4J3Jth6eOdxtHgCDepsshJEzcdpOyds4a\r\nwPpQWF5Rf6n6b4vl9Z/bSx5kPptwfjh/8WQ13bxpqfM5aEiP07pqi7LX3XJX\r\nO8TQjQQmuggqHeq+JiuI0ng+zX3Gc06hY1lvNhIduGoS38Yhhkbx2XSEcYPX\r\n+uVtGpKazymYScU5T0/9xYPaGq4f9ZrkBQxJ21b8vYSoKFtZPkBjtmJDLJs8\r\no0StSO0BYaa80UxvEQKfq2nNR+VI6r3KjVo=\r\n=AS61\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-snapshot-20230113133411_1673616883697_0.9511805908467139"},"_hasShrinkwrap":false},"0.0.0-snapshot-20230113134616":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-snapshot-20230113134616","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-snapshot-20230113134616","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-snapshot-20230113134616","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-qflV1bOwfAfDDH6Q83Ha6QahdSI6vJWHkJV9er+ATF8RX3O5nomenVjWjm193E9JgEnvOO1/0lHu9+ji+9uDkw==","shasum":"0f4a6ad7ce83107d8be084b3f13c5a596ed59050","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-snapshot-20230113134616.tgz","fileCount":25,"unpackedSize":64377,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6ge3g3LbMOJF0cTEKw9gWR2sRVzH1hP61rZKZ5uBloAiAlWRN7f9BFjazFt1UpF0LH0kABUIfQS0MXGWKzMzNUpw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwWDNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIIw/9FxwV8IX2k4kB9liRHdCF9SPhQG194Y9CmzUaacW2MULxu4XO\r\n5c+Kr+T9kyvbjgDPu10MOF3O28em1WwmMYlnp5IryAfIYUrTto3e9GJt2Z8i\r\nEjAm8NaveZQG4J6GBRIlRp1k77EgUHDolnsADLsmEHRqIYPPXyfF9X2iuPFj\r\nTibrZcpw6EH3RsTF4uCUyTDHK/B3Lfu0jOcV3et7sME2RPQ85T9xB+teB2M2\r\ntQbMREfw0DpTFTnd7ZMHn87yVAFc/F8wc7OxLueUIFaaoM66FaV9lrzBG5BF\r\nh1j0Cus5xlUAu5atKKHWuW4/lkxW/VmbcjWS7o6yIxDsRaHmivd0z8tJ0ngl\r\ncnwt4yZSea4msNOOalYWFTEEVKLqSY2+7SbdnWD2/reRlI/ATT5+RxYOhlJs\r\nvLXrQTZtAi3pf6coD+JUF7/1BzLs/KKPgVNvjICEpXHO/fnMM6OlojrceW3g\r\nmV9aiwnvoJcMOQv1ZnDyghdABlBuhzyKnw+24XQqNNJkraFx20uwUpm24vwQ\r\nYo0lNvsWUOLcWBp/LD5vJzYydjenlbUYt2Z6kr24t/WelpEW/252nXZ+/UBG\r\nILN0R0Qruq7etE8HoodTcJ0h3/7jGNekmN9WZiEPre/qgrxharL2exJJMAHz\r\nEQ62ERquSXva1Lo0eqkMalDPqqMDd7a8Y3c=\r\n=mNBX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-snapshot-20230113134616_1673617613818_0.6136165868544514"},"_hasShrinkwrap":false},"0.0.0-staging-20230113135316":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-staging-20230113135316","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-staging-20230113135316","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-staging-20230113135316","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-x8CiF8D2XxtwRIP/mqpWq5pFg8dlw9Dw+NVcRwFsjeTU1bfsU17vQstPmQxqkwCp+Lv7IbpqQkeMCBnCcVXYLg==","shasum":"2beba3b7f8b61a5e72546327f201d96855dedf41","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-staging-20230113135316.tgz","fileCount":25,"unpackedSize":64373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCO1dcUewzhiZOz4exe4QLsBOY/kioc8F151ZaD6fjMhAIhAODU3qvtKqPfHff+XHi1ffm6nAfYnHohfJPM1j7Hx8cY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwWJtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9nw//d/to4nkFlNecMgNLgIPYaECc1a9VmkXUTu5FxLwd2jhKb8M7\r\nkUptyxIPpoc5TaR5vVda8jdbUOD6Qyaqp6IGOdvLtWcxsluBwToSapnptE0l\r\nJhpPWa/B6inMkqMf5xDUAPqORu+xDmwGiSpjbLjTw+9QQD1x1MQ4jGVIsiC0\r\nqZfjTPu+2ia0/CO4dg78h5t1e2ux2qifxQt59Tl1lvLD+thV4n+ExY9tiTFd\r\nMhBDl6sZhQt9YXWx2cYYpk8CIeYbukfoctTfAdG1ZCLIeiBpq/a/eFTdZGXV\r\n34NVLywi3PVc/QQCaeTexfwkgrRWlt1jRX021jQ2Urr4BiqRQAA9KYuAtRQp\r\nAFszcQIXzY8fGhZkqKiKQ66JZAktDsQbIuGZrcs6We7Zyrc8rZxixLbgSZqy\r\nkLg9c7WY0iXRIfWuHCnOdHGeGA6Jjxzsoe2hO9GRi5zjQ9gmetSMyE2gSnO3\r\n27bXKm3GqQGHvugHX9pXIbVZh8wUMyjeJD+e8wEp+os63QTUT6ei1n5xr0E4\r\nHUGH6yYtVkpp8EbqWHIbMSSKe86ifz0w7vK1X2ukN45w2g3asT4Tp165Eg3l\r\nZZvCCp3WuXjJ0k8uGCq1gykmQbj40DtMRp+ovI3K1dhS0kL5+XhviEvhrqoG\r\n4dojcoG7Z9lcLP5jrgSRKhrqDAwpgjk+MBA=\r\n=iUGG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-staging-20230113135316_1673618029449_0.518949957253197"},"_hasShrinkwrap":false},"0.0.0-snapshot-20230113135425":{"name":"@pkorsholm/medusa-plugin-restock-notification","version":"0.0.0-snapshot-20230113135425","main":"index.js","repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"license":"MIT","devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-typescript":"^7.12.7","@pkorsholm/babel-preset-medusa-package":"^1.1.19","@pkorsholm/medusa-test-utils":"^1.1.37","cross-env":"^5.2.1","jest":"^25.5.2","pg":"^8.5.1","ulid":"^2.3.0"},"scripts":{"build":"babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"","prepare":"cross-env NODE_ENV=production yarn run build","watch":"babel -w src --out-dir . --ignore **/__tests__","test":"jest"},"peerDependencies":{"@pkorsholm/medusa":"0.0.0-snapshot-20230113135425","@pkorsholm/medusa-interfaces":"1.x"},"dependencies":{"@pkorsholm/medusa-core-utils":"^1.1.31","body-parser":"^1.19.0","cors":"^2.8.5","express":"^4.17.1"},"gitHead":"cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e","keywords":["medusa-plugin","medusa-plugin-notification"],"readme":"# medusa-plugin-restock-notification\n\n\n## Usage\n\nInstall the plugin:\n\n`$ yarn add medusa-plugin-restock-notification`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`\n  ]\n}\n```\n\nThe plugin will migrate your database to include the RestockNotification entity, which consists of a variant id of a sold out item and a jsonb list of arrays that wish to be notified about restocks for the item.\n\n\n## API endpoint\n\nThe plugin exposes an endpoint to sign emails up for restock notifications:\n\n```\nPOST /restock-notifications/variants/:variant_id\n\nBody\n{\n  \"email\": \"seb@test.com\"\n}\n```\n\nThe endpoint responds with `200 OK` on successful signups. If a signup for an already in stock item is attempted the endpoint will have a 400 response code.\n\n\n## Restock events\n\nThe plugin listens for the `product-variant.updated` call and emits a `restock-notification.restocked` event when a variant with restock signups become available.\n\nThe data sent with the `restock-notification.restocked` event is:\n```\nvariant_id: The id of the variant to listen for restock events for.\nemails: An array of emails that are to be notified of restocks.\n\ne.g.\n\n{\n  \"variant_id\": \"variant_1234567890\",\n  \"emails\": [\"seb@test.com\", \"oli@test.com\"]\n}\n```\n\n*Note: This plugin does not send any communication to the customer, communication logic must be implemented or provided through a communication plugin.*\n\nYou may use `medusa-plugin-sendgrid` to orchestrate transactional emails.\n\n\n## Usage with medusa-plugin-sendgrid\n\nInstall the plugins:\n`$ yarn add medusa-plugin-restock-notification medusa-plugin-sendgrid`\n\n```js\n// medusa-config.js\n\nmodule.exports = {\n  ...,\n  plugins: [\n    ...,\n    `medusa-plugin-restock-notification`,\n    {\n      resolve: `medusa-plugin-sendgrid`,\n      options: {\n        from: SENDGRID_FROM,\n        api_key: SENDGRID_API_KEY,\n        medusa_restock_template: `d-13141234123412342314`\n      }\n    }\n  ]\n}\n```\n\nYou should set up a dynamic template in SendGrid which will be send for each of the emails in the restock notification.\n\n","readmeFilename":"README.md","description":"","bugs":{"url":"https://github.com/medusajs/medusa/issues"},"homepage":"https://github.com/medusajs/medusa#readme","_id":"@pkorsholm/medusa-plugin-restock-notification@0.0.0-snapshot-20230113135425","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-eMM5xqu86LAw+i/fCwZyJUim/OyDyfUA7pC7PxDkyXzJfWsKN1IJa3QQ9h8LjGwkAeLTe+0+tXz7xInvOa6XFg==","shasum":"6029782aab179f99e11b56bec6cc03ad28d4be77","tarball":"https://registry.npmjs.org/@pkorsholm/medusa-plugin-restock-notification/-/medusa-plugin-restock-notification-0.0.0-snapshot-20230113135425.tgz","fileCount":25,"unpackedSize":64377,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHLMJEqaLxEdQLD/ZLSkY8qoEk8GEZlhn0UnyPVsWy7QIhALvSxxP7raxRcwr4C1SITfD6Ij344IkYndw1BcALxBTL"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwWK4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpr1Q//TO4lSTch4TeT/saaiz3CUgHNOLaYDuYVZuc3uo7Sxc7golJ3\r\nlS/To26mD5W3rRHeTdVedPy+w+scAgBOHmtqcik9muoIT6H611Gc48oP5WF0\r\nuCedOh67QcOXt9DqQG7ukSZRJGBO1enHm3ou5Jrj8ckUj8S0ZmLAnenycoBe\r\nw+6/pJFJNXyWpPXqcSxJKmwDAleRG2+MmfaBw+HyXrMinWqmsw40P0Sb3sZI\r\nX8nzJTQkVrSEPjMzNhM5DA46zFBgoxSSrjg53d1xgXrxR/zNnEY2Gj3GKkfH\r\nUnQ83xNKfMbPFHCd0zk25dt4Gi7sNMrjvnaI9XkgLev1A+iVQuJRNUhmGMGH\r\nw/obsXV0Q2mBg5b8uy9g+YKQL3QQlELPKyvooZkahMu5tHgyYpfGY+Mko4UU\r\nEu6gyPshWpz5FZ0Ll3V+1D1LXdJHKk/WwHBxwjCuDPeaU+a/zdxRBIByCFEj\r\nlDD6485mv5dgtnLqkCKhYrcFjs43amYd4pxRgiVXObkmYHnje6tT2f+ChQr1\r\n22qNfjXCprktYUYm/uT8wrIs/em2KqnYNC3m5bnQl6Oi7e8xSdr23qhqEYaK\r\n++mDUHcTO/ixPzqLS5shViwl5nPMaM5rgboibOTjPFiAWjCmdEG2E6+uyZL6\r\ndiFyR96vZGcaocXqEYlAxKNCrLXSkhc2g1w=\r\n=LesX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"},"directories":{},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medusa-plugin-restock-notification_0.0.0-snapshot-20230113135425_1673618103828_0.5633365308778782"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-10T06:47:55.777Z","1.0.0":"2022-11-10T06:47:56.020Z","modified":"2023-01-13T13:55:04.119Z","0.0.0-staging-20221110091025":"2022-11-10T09:11:46.191Z","0.0.0-staging-20221110094848":"2022-11-10T09:49:26.180Z","0.0.0-staging-20221111015503":"2022-11-11T01:55:34.490Z","0.0.0-staging-20221111044724":"2022-11-11T04:47:57.432Z","0.0.0-staging-20221111045133":"2022-11-11T04:51:59.925Z","0.0.0-staging-20221111045920":"2022-11-11T05:00:03.917Z","0.0.0-staging-20221111050432":"2022-11-11T05:05:07.115Z","0.0.0-staging-20221111050935":"2022-11-11T05:10:03.327Z","0.0.0-staging-20221111051631":"2022-11-11T05:17:04.642Z","0.0.0-staging-20221111054908":"2022-11-11T05:49:38.757Z","0.0.0-staging-20221111070030":"2022-11-11T07:01:03.103Z","0.0.0-staging-20221111084533":"2022-11-11T08:46:11.761Z","0.0.0-staging-20221111085456":"2022-11-11T08:55:29.017Z","0.0.0-staging-20221111085751":"2022-11-11T08:58:25.266Z","0.0.0-staging-20221111090402":"2022-11-11T09:04:39.492Z","0.0.0-staging-20221111091336":"2022-11-11T09:14:10.768Z","0.0.0-staging-20221114093335":"2022-11-14T09:34:09.102Z","0.0.0-staging-20221114093650":"2022-11-14T09:37:22.826Z","0.0.0-staging-20221115075706":"2022-11-15T07:57:31.130Z","0.0.0-staging-20221115080331":"2022-11-15T08:04:05.894Z","0.0.0-staging-20221117114840":"2022-11-17T11:49:17.964Z","0.0.0-staging-20221117115640":"2022-11-17T11:57:27.742Z","1.0.1-staging-20221117124640":"2022-11-17T12:47:40.454Z","1.0.1-staging-20221117132132":"2022-11-17T13:22:24.462Z","1.0.1-staging-20221123105823":"2022-11-23T10:59:31.554Z","1.0.1-staging-20221123114650":"2022-11-23T11:47:51.895Z","1.0.1-staging-20221123115753":"2022-11-23T11:58:45.404Z","1.0.1-staging-20221123122107":"2022-11-23T12:22:05.609Z","1.0.1-staging-20221123153837":"2022-11-23T15:39:31.428Z","1.0.1-staging-20221123154545":"2022-11-23T15:46:36.285Z","1.0.1-staging-20221123160311":"2022-11-23T16:04:02.563Z","1.0.1-staging-20221123160829":"2022-11-23T16:09:29.635Z","1.0.1-staging-20221129095119":"2022-11-29T09:52:30.449Z","1.0.1-staging-20221129101347":"2022-11-29T10:14:42.508Z","1.0.1-staging-20221129103019":"2022-11-29T10:31:20.807Z","1.0.1-snapshot-20230111104551":"2023-01-11T10:46:27.708Z","1.0.1-snapshot-20230111105607":"2023-01-11T10:56:45.552Z","1.0.1-snapshot-20230111111223":"2023-01-11T11:13:12.953Z","1.0.1-staging-20230111165320":"2023-01-11T16:54:35.488Z","0.0.0-snapshot-20230113133411":"2023-01-13T13:34:43.867Z","0.0.0-snapshot-20230113134616":"2023-01-13T13:46:53.931Z","0.0.0-staging-20230113135316":"2023-01-13T13:53:49.630Z","0.0.0-snapshot-20230113135425":"2023-01-13T13:55:04.003Z"},"maintainers":[{"name":"pkorsholm","email":"philip.korsholm@hotmail.com"}],"homepage":"https://github.com/medusajs/medusa#readme","keywords":["medusa-plugin","medusa-plugin-notification"],"repository":{"type":"git","url":"git+https://github.com/medusajs/medusa.git","directory":"packages/medusa-plugin-restock-notification"},"author":{"name":"Sebastian Rindom","email":"seb@medusa-commerce.com"},"bugs":{"url":"https://github.com/medusajs/medusa/issues"},"license":"MIT","readme":"","readmeFilename":""}