{"_id":"@codecademy/webpush-client","_rev":"4-2e0e433cfe5f3d5543ea1e469ebe8604","name":"@codecademy/webpush-client","dist-tags":{"alpha.54ad84":"0.1.1-alpha.54ad84.0","latest":"0.1.1-alpha.54ad84.0","alpha.982f78":"0.1.1-alpha.982f78.0"},"versions":{"0.1.1-alpha.54ad84.0":{"name":"@codecademy/webpush-client","version":"0.1.1-alpha.54ad84.0","keywords":["firebase","webpush","react"],"author":{"name":"Codecademy Engineering","email":"dev@codecademy.com"},"license":"MIT","_id":"@codecademy/webpush-client@0.1.1-alpha.54ad84.0","maintainers":[{"name":"codecademy","email":"dev@codecademy.com"}],"homepage":"https://github.com/Codecademy/client-modules#readme","bugs":{"url":"https://github.com/Codecademy/client-modules/issues"},"dist":{"shasum":"b096fc9abb69e6f124f90c4f7eddc1f986a9d9b4","tarball":"https://registry.npmjs.org/@codecademy/webpush-client/-/webpush-client-0.1.1-alpha.54ad84.0.tgz","fileCount":4,"integrity":"sha512-cqGp597TSnkMBHMNTKYryuh5bRfpWM6PyY7fMnxeAvVbqIY1vVi5x4yPjTFUokVXhNI2GEiduSEMkzQZ/ZaCwg==","signatures":[{"sig":"MEQCIEgFUXFTPuy10ZvXmz1bL2okKYm+X59HxfhZPwSj5mSUAiBfQV4IeoCI6CNetHvM7Qicj+GJrpuWeqDp7BS8wqgj0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbfiNCRA9TVsSAnZWagAAnWkP/2Rqce1twg+TGxCZpxbA\nZXUVm8WsRkyTjYnU5DdMRvKdA2FUaYkqOOD6X4M68OaZlSO0A2Aa6Uz6ip/l\n66sV6gUgtJZRfH1F8u2s/EE1XSk3F6k9nGXQput8vFdpgAgc+UkrTDMzogBX\nAWVM7MudeT3LaP/oXe/+tnKXWsWn2F2Ooy9jAK+Oqay0Gq0mGBW1UNdpEd+5\nOSkmLU2CNI7f8+ppkC5ib/gDCIH7zrPW6JoXt+TPL1XuZS1rOc0Yec6il0jn\nc70lUJViNIq7EezvRzQKMOjcWhSRLl3WqLgr5fPhijEWQTaAAj5TMMJslDea\n5AtgmExuCjI+osdR/JV7/f+tL66pLNaNlhwTFl4arHZdeKnSQ94XjTFV9JtZ\nFhdn8u02FP7378ZwZi/LLYaSWQ4UXkpjvpsbK1UWMEb6yvr/MawGiANkeyWM\noINDk3hXEJ1PS0UR5FD+HxnIjFnYY6ADKnRpUodrFXgTSnyXQcuSLiDfWemR\n2KS0WN61xd5x0phrsTTHZMucicGXhr6d1uUCNyOpp70PNpa7JwQUz+fiZ21O\nH2WKgNHqblD3dQYDpRIwUoFTufVz88WyWaETbpQ/bTGE+BZpNd6aiWO0kIH4\ndduNJ6y0v4zRKFaBoZ0gBlh5DMKlRmiqdsxCV9vAc8Je9YrRHYybR9FaWTw0\nwuqg\r\n=7srR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.js","gitHead":"6a8d147874b012adbafa1283219f58400e2d766c","scripts":{"test":"jest","build":"yarn build:clean && yarn build:compile && yarn build:types","verify":"tsc --noEmit","test-watch":"jest --watch","build:clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly","build:compile":"babel ./src --out-dir ./dist --copy-files --extensions \".ts,.tsx\"","lernaBuildTask":"yarn build"},"_npmUser":{"name":"codecademy","email":"dev@codecademy.com"},"repository":{"url":"git+ssh://git@github.com/Codecademy/client-modules.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.16.0+x64 (linux)","description":"Pluggable webpush integration.","directories":{"lib":"lib","test":"__tests__"},"_nodeVersion":"12.16.0","dependencies":{"firebase":"^8.2.9","@babel/runtime":"^7.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@babel/cli":"^7.13.10","typescript":"*","@types/jest":"^26.0.15","babel-preset-codecademy":"^2.3.0"},"peerDependencies":{"react":">=16.8.1","react-dom":">=16.8.1"},"_npmOperationalInternal":{"tmp":"tmp/webpush-client_0.1.1-alpha.54ad84.0_1617819789468_0.9969152350281283","host":"s3://npm-registry-packages"}},"0.1.1-alpha.982f78.0":{"name":"@codecademy/webpush-client","version":"0.1.1-alpha.982f78.0","keywords":["firebase","webpush","react"],"author":{"name":"Codecademy Engineering","email":"dev@codecademy.com"},"license":"MIT","_id":"@codecademy/webpush-client@0.1.1-alpha.982f78.0","maintainers":[{"name":"codecademy","email":"dev@codecademy.com"}],"homepage":"https://github.com/Codecademy/client-modules#readme","bugs":{"url":"https://github.com/Codecademy/client-modules/issues"},"dist":{"shasum":"c862ffeeaadde096f4650186e53165e70b3e580d","tarball":"https://registry.npmjs.org/@codecademy/webpush-client/-/webpush-client-0.1.1-alpha.982f78.0.tgz","fileCount":4,"integrity":"sha512-n7VZP4LwtnaYrVNbc8zMjDmERKL2Wh1GRQjV6y1qSognPtctzhQHhOmdfOyt9r4gr1I18nMsRQ7MpJtnRcKqjg==","signatures":[{"sig":"MEUCIQCzFAqECT9ai2CxJBJkxGwkmYY4v/ZSl2/ksbVnTEqlQQIgfbI7ft24v4rzb3rgVJZkJ0huHq2tjixR9Obk+I1ETDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbplZCRA9TVsSAnZWagAAIlUP/13cr1dzEyt9IwLcfMaR\n8uE9yCCM42KNTz8NJE8B/mfRqKg0Ox7+Nz9A8Q0vLCR+LTG83G+ulTVs/rSs\np7u7sONY3cuvse/UVcYM0+vxXlc5BryHkZ4fdppsRqqzRiqGeeRIzcY+FYnu\nL/MJ5/i8ZgDD3fEOed7vjljEYgIqbaAIURqLpSNdMRxD/2DOd70pKMQpETSg\nXXY09f4XR7bM4BbziHBEdKwIeqP+d1AF6Kx8ERlnd0XOcO6Sx29TD43Y8Dil\nCsoPUIq1FnfwYT8rSZ961fn9FV6rXqZF+kl+OGaYY4NQRbv+bwB+oGEI4SM1\nEJDT15CawL3CE0B540U4vBSz6gHHz3dIbBfV7TTqGfdUYwwm8VXaCLhYO3WV\nm/WKxNiUUv1JQ2KhP1VZFRBpJr6EnaOeX+UiNmJn16blhvzlMAzn8/QRpgga\nXFzs/FFNqOITNjox6UfPTK4gTQq6rWzJOi7anBZjiN/xnC9+th7CBYtaeKsq\nUi5b/6QR5ZNvq+DiYv3h+bxfDdgDwygZsQl0ql11fFjT3bOAuwy5UF/unHO7\n/QeXS5Y6/4jE1f0GFg2nXWkLpmS87zMN9kSiIxPiA9zvYvUBNEWolIz6HDC7\nuXakVyYdP47I/SJrDemhM/W7Ga8lB7lg3mg3a1xCwMhAb6tRBupvG88HVgnt\nVwIt\r\n=/d6Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.js","readme":"# `@codecademy/webpush-client`\n\n## Usage\n\n```tsx\nimport { Webpush } from '@codecademy/webpush-client';\n\nconst config = {\n  apiKey: 'API_KEY',\n  authDomain: 'AUTH_DOMAIN',\n  projectId: 'PROJECT_ID',\n  storageBucket: 'STORAGE_BUCKET',\n  messagingSenderId: 'SENDER_ID',\n  appId: 'APP_ID',\n  measurementId: 'MEASUREMENT_ID',\n};\n\nconst App = () => {\n  return (\n    <div>\n      <Webpush\n        config={config}\n        vapidKey=\"VAPID_KEY\"\n        shouldRequest\n        onRegisterSuccess={(token) => {\n          // handle registration sideffects\n        }}\n        onMessageRecieved={(foregroundMessage) => {\n          // handle foreground message sideffects\n        }}\n      />\n    </div>\n  );\n};\n```\n\n### Props\n\n```tsx\nexport interface FirebaseConfig {\n  apiKey: string;\n  authDomain: string;\n  projectId: string;\n  storageBucket: string;\n  messagingSenderId: string;\n  appId: string;\n  measurementId: string;\n}\n\nexport interface WebpushProps {\n  config: FirebaseConfig;\n  /** Sender Key */\n  vapidKey: string;\n  /** Determines if we request for permissions */\n  requestPermission: boolean;\n  /** Called on a succesful retrieval of a users token from firebase */\n  onRegisterSuccess: (token?: string) => void;\n  /** Called when a message has been recieved in the foreground instead of the background */\n  onMessageRecieved: (message: unknown) => void;\n}\n```\n","gitHead":"409cec4fe27e61902a6d782f8700b191cb61b861","scripts":{"test":"jest","build":"yarn build:clean && yarn build:compile && yarn build:types","verify":"tsc --noEmit","test-watch":"jest --watch","build:clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly","build:compile":"babel ./src --out-dir ./dist --copy-files --extensions \".ts,.tsx\"","lernaBuildTask":"yarn build"},"_npmUser":{"name":"codecademy","email":"dev@codecademy.com"},"repository":{"url":"git+ssh://git@github.com/Codecademy/client-modules.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.16.0+x64 (linux)","description":"Pluggable webpush integration.","directories":{"lib":"lib","test":"__tests__"},"_nodeVersion":"12.16.0","dependencies":{"firebase":"^8.2.9","@babel/runtime":"^7.12.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@babel/cli":"^7.13.10","typescript":"*","@types/jest":"^26.0.15","babel-preset-codecademy":"^2.3.0"},"peerDependencies":{"react":">=16.8.1","react-dom":">=16.8.1"},"_npmOperationalInternal":{"tmp":"tmp/webpush-client_0.1.1-alpha.982f78.0_1617860952729_0.8716499476291497","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-04-07T18:23:09.418Z","modified":"2025-12-09T21:51:14.915Z","0.1.1-alpha.54ad84.0":"2021-04-07T18:23:09.667Z","0.1.1-alpha.982f78.0":"2021-04-08T05:49:12.910Z"},"bugs":{"url":"https://github.com/Codecademy/client-modules/issues"},"author":{"name":"Codecademy Engineering","email":"dev@codecademy.com"},"license":"MIT","homepage":"https://github.com/Codecademy/client-modules#readme","keywords":["firebase","webpush","react"],"repository":{"url":"git+ssh://git@github.com/Codecademy/client-modules.git","type":"git"},"description":"Pluggable webpush integration.","maintainers":[{"email":"dev@codecademy.com","name":"codecademy-eng"}],"readme":"","readmeFilename":""}