{"id":24764494,"url":"https://github.com/seamapi/javascript-webhook","last_synced_at":"2026-01-26T20:54:28.157Z","repository":{"id":216773740,"uuid":"741744051","full_name":"seamapi/javascript-webhook","owner":"seamapi","description":"Webhook SDK for the Seam API written in TypeScript.","archived":false,"fork":false,"pushed_at":"2025-08-19T21:26:41.000Z","size":884,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-26T21:08:52.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seamapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-11T02:42:19.000Z","updated_at":"2025-08-19T21:26:44.000Z","dependencies_parsed_at":"2024-01-12T18:51:51.304Z","dependency_job_id":"7ead97f8-bebd-46c9-8ae4-95bd272aa6be","html_url":"https://github.com/seamapi/javascript-webhook","commit_stats":null,"previous_names":["seamapi/javascript-webhook"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/seamapi/javascript-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fjavascript-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fjavascript-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fjavascript-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fjavascript-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/javascript-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fjavascript-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28787632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T22:31:52.131Z","updated_at":"2026-01-26T20:54:28.140Z","avatar_url":"https://github.com/seamapi.png","language":"TypeScript","readme":"# Seam Webhook SDK\n\n[![npm](https://img.shields.io/npm/v/@seamapi/webhook.svg)](https://www.npmjs.com/package/@seamapi/webhook)\n[![GitHub Actions](https://github.com/seamapi/javascript-webhook/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/javascript-webhook/actions/workflows/check.yml)\n\nWebhook SDK for the Seam API written in TypeScript.\n\n## Description\n\n[Seam] makes it easy to integrate IoT devices with your applications.\nThis is an official SDK for the Seam API.\nPlease refer to the official [Seam Docs] to get started.\n\nThe Seam API implements webhooks using [Svix].\nThis SDK exports a thin wrapper around the svix package\nUse it to parse and validate Seam webhook events\nwith full TypeScript support for Seam event types.\n\nRefer to the [Svix docs on Consuming Webhooks] for\nan in-depth guide on best-practices for handling webhooks\nin your application.\n\n[Seam]: https://www.seam.co/\n[Seam Docs]: https://docs.seam.co/latest/\n[Svix]: https://www.svix.com/\n[Svix docs on Consuming Webhooks]: https://docs.svix.com/receiving/introduction\n\n## Installation\n\n\u003e [!IMPORTANT]\n\u003e This is a low-level package meant for applications and libraries with particular dependency requirements.\n\u003e Before using this package, ensure you understand the installation and updating instructions.\n\u003e This SDK is entirely contained in the [seam package].\n\u003e Seam recommends using that package instead for simpler dependency management.\n\nAdd this as a dependency to your project using [npm] with\n\n```\n$ npm install @seamapi/webhook\n```\n\n[npm]: https://www.npmjs.com/\n[seam package]: https://www.npmjs.com/package/seam\n\n### Optional Peer Dependencies for TypeScript\n\nThis package has optional peer dependencies for TypeScript users.\nRecent versions of npm will automatically install peer dependencies by default.\nFor those users, no additional steps are necessary for full TypeScript support,\nhowever users should still explicitly install the latest types (see the next section).\n\nOther package managers require peer dependencies to be added manually.\nRefer to any warnings generated by your package manager\nabout missing peer dependencies and install them as needed.\nRefer to the next section for keeping the types updated.\n\n#### Keeping up with the latest types\n\nThis package depends on [@seamapi/types] for the latest TypeScript types.\nNew versions of this SDK are generally not released when new types are published.\nUnless your project frequently runs a blanket `npm update`,\nthe types will become outdated with the Seam API over time.\nThus, users of this package should explicitly install the types with\n\n```\n$ npm install -D @seamapi/types\n```\n\nand update them when consuming new API features with\n\n```\n$ npm install -D @seamapi/types@latest\n```\n\n## Usage\n\nThe Seam API implements webhooks using [Svix](https://www.svix.com).\nThis SDK exports a thin wrapper `SeamWebhook` around the svix package.\nUse it to parse and validate [Seam webhook events](https://docs.seam.co/latest/developer-tools/webhooks).\n\nRefer to the [Svix docs on Consuming Webhooks](https://docs.svix.com/receiving/introduction)\nfor an in-depth guide on best-practices for handling webhooks in your application.\n\n\u003e [!TIP]\n\u003e This example is for [Express](https://expressjs.com/),\n\u003e see the [Svix docs for more examples in specific frameworks](https://docs.svix.com/receiving/verifying-payloads/how).\n\n```js\nimport { env } from 'node:process'\n\nimport { SeamWebhook } from '@seamapi/webhook'\nimport express from 'express'\nimport bodyParser from 'body-parser'\n\nconst app = express()\n\nconst webhook = new SeamWebhook(env.SEAM_WEBHOOK_SECRET)\n\napp.post(\n  '/webhook',\n  bodyParser.raw({ type: 'application/json' }),\n  (req, res) =\u003e {\n    let data\n    try {\n      data = webhook.verify(req.body, req.headers)\n    } catch {\n      return res.status(400).send()\n    }\n    storeEvent(data, (err) =\u003e {\n      if (err != null) {\n        return res.status(500).send()\n      }\n      res.status(204).send()\n    })\n  },\n)\n\nconst storeEvent = (data, callback) =\u003e {\n  console.log(data)\n  callback()\n}\n\napp.listen(8080, () =\u003e {\n  console.log('Ready to receive webhooks at http://localhost:8080/webhook')\n})\n```\n\n## Development and Testing\n\n### Quickstart\n\n```\n$ git clone https://github.com/seamapi/javascript-webhook.git\n$ cd javascript-webhook\n$ nvm install\n$ npm install\n$ npm run test:watch\n```\n\nPrimary development tasks are defined under `scripts` in `package.json`\nand available via `npm run`.\nView them with\n\n```\n$ npm run\n```\n\n### Source code\n\nThe [source code] is hosted on GitHub.\nClone the project with\n\n```\n$ git clone git@github.com:seamapi/javascript-webhook.git\n```\n\n[source code]: https://github.com/seamapi/javascript-webhook\n\n### Requirements\n\nYou will need [Node.js] with [npm] and a [Node.js debugging] client.\n\nBe sure that all commands run under the correct Node version, e.g.,\nif using [nvm], install the correct version with\n\n```\n$ nvm install\n```\n\nSet the active version for each shell session with\n\n```\n$ nvm use\n```\n\nInstall the development dependencies with\n\n```\n$ npm install\n```\n\n[Node.js]: https://nodejs.org/\n[Node.js debugging]: https://nodejs.org/en/docs/guides/debugging-getting-started/\n[npm]: https://www.npmjs.com/\n[nvm]: https://github.com/creationix/nvm\n\n### Publishing\n\n#### Automatic\n\nNew versions are released automatically with [semantic-release]\nas long as commits follow the [Angular Commit Message Conventions].\n\n[Angular Commit Message Conventions]: https://semantic-release.gitbook.io/semantic-release/#commit-message-format\n[semantic-release]: https://semantic-release.gitbook.io/\n\n#### Manual\n\nPublish a new version by triggering a [version workflow_dispatch on GitHub Actions].\nThe `version` input will be passed as the first argument to [npm-version].\n\nThis may be done on the web or using the [GitHub CLI] with\n\n```\n$ gh workflow run version.yml --raw-field version=\u003cversion\u003e\n```\n\n[GitHub CLI]: https://cli.github.com/\n[npm-version]: https://docs.npmjs.com/cli/version\n[version workflow_dispatch on GitHub Actions]: https://github.com/seamapi/javascript-webhook/actions?query=workflow%3Aversion\n\n## GitHub Actions\n\n_GitHub Actions should already be configured: this section is for reference only._\n\nThe following repository secrets must be set on [GitHub Actions]:\n\n- `NPM_TOKEN`: npm token for installing and publishing packages.\n- `GH_TOKEN`: A personal access token for the bot user with\n  `packages:write` and `contents:write` permission.\n- `GIT_USER_NAME`: The GitHub bot user's real name.\n- `GIT_USER_EMAIL`: The GitHub bot user's email.\n- `GPG_PRIVATE_KEY`: The GitHub bot user's [GPG private key].\n- `GPG_PASSPHRASE`: The GitHub bot user's GPG passphrase.\n\n[GitHub Actions]: https://github.com/features/actions\n[GPG private key]: https://github.com/marketplace/actions/import-gpg#prerequisites\n\n## Contributing\n\n\u003e If using squash merge, edit and ensure the commit message follows the [Angular Commit Message Conventions] specification.\n\u003e Otherwise, each individual commit must follow the [Angular Commit Message Conventions] specification.\n\n1. Create your feature branch (`git checkout -b my-new-feature`).\n2. Make changes.\n3. Commit your changes (`git commit -am 'Add some feature'`).\n4. Push to the branch (`git push origin my-new-feature`).\n5. Create a new draft pull request.\n6. Ensure all checks pass.\n7. Mark your pull request ready for review.\n8. Wait for the required approval from the code owners.\n9. Merge when ready.\n\n[Angular Commit Message Conventions]: https://semantic-release.gitbook.io/semantic-release/#commit-message-format\n\n## License\n\nThis npm package is licensed under the MIT license.\n\n## Warranty\n\nThis software is provided by the copyright holders and contributors \"as is\" and\nany express or implied warranties, including, but not limited to, the implied\nwarranties of merchantability and fitness for a particular purpose are\ndisclaimed. In no event shall the copyright holder or contributors be liable for\nany direct, indirect, incidental, special, exemplary, or consequential damages\n(including, but not limited to, procurement of substitute goods or services;\nloss of use, data, or profits; or business interruption) however caused and on\nany theory of liability, whether in contract, strict liability, or tort\n(including negligence or otherwise) arising in any way out of the use of this\nsoftware, even if advised of the possibility of such damage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fjavascript-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Fjavascript-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fjavascript-webhook/lists"}