diff --git a/README.md b/README.md index 7a5b471..5455ce0 100644 --- a/README.md +++ b/README.md @@ -442,11 +442,16 @@ const devices = await request.execute() ### Receiving Webhooks -First, create a webhook using the Seam API or Seam Console -and obtain a Seam webhook secret. +The Seam API implements webhooks using [Svix](https://www.svix.com). +This SDK exports a thin wrapper `SeamWebhook` around the svix package. +Use it to parse and validate [Seam webhook events](https://docs.seam.co/latest/developer-tools/webhooks). + +Refer to the [Svix docs on Consuming Webhooks](https://docs.svix.com/receiving/introduction) +for an in-depth guide on best-practices for handling webhooks in your application. > [!TIP] -> This example is for [Express], see the [Svix docs for more examples in specific frameworks](https://docs.svix.com/receiving/verifying-payloads/how). +> This example is for [Express](https://expressjs.com/), +> see the [Svix docs for more examples in specific frameworks](https://docs.svix.com/receiving/verifying-payloads/how). ```js import { env } from 'node:process' @@ -488,8 +493,6 @@ app.listen(8080, () => { }) ``` -[Express]: https://expressjs.com/ - ## Development and Testing ### Quickstart diff --git a/package-lock.json b/package-lock.json index 38cf6ad..68b2b59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "1.31.0", "license": "MIT", "dependencies": { - "@seamapi/http": "1.11.1", - "@seamapi/types": "1.264.2", - "@seamapi/webhook": "1.1.0", + "@seamapi/http": "1.12.0", + "@seamapi/types": "1.286.1", + "@seamapi/webhook": "1.1.1", "zod": "^3.21.4" }, "devDependencies": { @@ -1052,9 +1052,9 @@ ] }, "node_modules/@seamapi/http": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-1.11.1.tgz", - "integrity": "sha512-eYzDzZqrbDCRnMQOQtyGw6nd0SF4YdvizpCpIYDWMgM5MvVRL04Sv56CAC2SatRXVFbajLbldZpnTfSkLRpRug==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-1.12.0.tgz", + "integrity": "sha512-YMYojjRDPuE5YJhQ/jGfhqfSOMC6s18Rf1FHb98kg7jEvR+29Wsw4eilcHCzxLb1YBzEw6QWeczkP2Gkx9e0qw==", "dependencies": { "@seamapi/url-search-params-serializer": "^1.1.0", "axios": "^1.5.0", @@ -1066,7 +1066,7 @@ "npm": ">= 9.0.0" }, "peerDependencies": { - "@seamapi/types": "^1.264.2" + "@seamapi/types": "^1.275.0" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -1075,9 +1075,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.264.2", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.264.2.tgz", - "integrity": "sha512-PJzQEN1TVmJ9rCIbgC/0R6iG0uc+/vlHzspknnxF5O5QzuH/pv+YN0vRFkF9WxTMo99lDjIPr6myEnlvAsX1WQ==", + "version": "1.286.1", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.286.1.tgz", + "integrity": "sha512-FRSCSgoa22MN2KEuQkgjMZlxMqx3GbWd30X16d+E/Ld7hDPCMPzg+lJD0ZDpTuZYPlH1t8cV92Szqv8T2iJNOg==", "engines": { "node": ">=18.12.0", "npm": ">= 9.0.0" @@ -1096,9 +1096,9 @@ } }, "node_modules/@seamapi/webhook": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@seamapi/webhook/-/webhook-1.1.0.tgz", - "integrity": "sha512-goRhC8vH6boSFftlHAlOyOSdeJqV0RTgYZGAoHDt+hEMWy6ifr7uwFlFQy6row8QHsLp+ulpE2UehF/BnHGQtQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@seamapi/webhook/-/webhook-1.1.1.tgz", + "integrity": "sha512-ngfypLTbQ8aYSLYUpsgmJz7ZtrQ0/aTC1D8os2oh0VpDIY5kHNpwlNt/pr7rpEeW9TUQChG+yxR2HoxMDT3jmA==", "dependencies": { "svix": "^1.15.0" }, diff --git a/package.json b/package.json index 2bf966b..c82594b 100644 --- a/package.json +++ b/package.json @@ -65,9 +65,9 @@ "npm": ">= 9.0.0" }, "dependencies": { - "@seamapi/http": "1.11.1", - "@seamapi/types": "1.264.2", - "@seamapi/webhook": "1.1.0", + "@seamapi/http": "1.12.0", + "@seamapi/types": "1.286.1", + "@seamapi/webhook": "1.1.1", "zod": "^3.21.4" }, "devDependencies": {