From dff64c23fe51c45669f5b84b6d2833f51a9d1725 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Sep 2026 19:03:49 +0000 Subject: [PATCH 1/2] feat(deps): bump @seamapi/http from 2.26.0 to 2.27.0 in the seam group Bumps the seam group with 1 update: [@seamapi/http](https://github.com/seamapi/javascript-http). Updates `@seamapi/http` from 2.26.0 to 2.27.0 - [Release notes](https://github.com/seamapi/javascript-http/releases) - [Commits](https://github.com/seamapi/javascript-http/compare/v2.26.0...v2.27.0) --- updated-dependencies: - dependency-name: "@seamapi/http" dependency-version: 2.27.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5b54264..89f8833 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@seamapi/cli": "0.37.0", - "@seamapi/http": "2.26.0", + "@seamapi/http": "2.27.0", "@seamapi/webhook": "1.5.0" }, "bin": { @@ -3378,9 +3378,9 @@ } }, "node_modules/@seamapi/http": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-2.26.0.tgz", - "integrity": "sha512-wxsTQVYUZJSq4r6ezodyvt9QF7slfSMHGPP3HEqazfhynZEu1yPdMPR+9+foKGdCGHlJl1+bDNmV1lqdT5agYw==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-2.27.0.tgz", + "integrity": "sha512-Rnp/hopA/UhdiWMFAqlvJ3ZmhUqBpBVRgmxYM8T3p/MIkS8WxjEYOrYb6/ZE+CgyKNZjcHyRtwTebNYpXI+XGw==", "license": "MIT", "dependencies": { "@seamapi/url-search-params-serializer": "^3.0.3", diff --git a/package.json b/package.json index a80e432..802e2ef 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "packageManager": "npm@11.19.0", "dependencies": { "@seamapi/cli": "0.37.0", - "@seamapi/http": "2.26.0", + "@seamapi/http": "2.27.0", "@seamapi/webhook": "1.5.0" }, "devDependencies": { From 3f9ee284a2a770d033d9fa45f266c2e61ee07fa9 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 4 Sep 2026 19:04:16 +0000 Subject: [PATCH 2/2] ci: Generate code --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 7ee47bf..ed243f7 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,31 @@ When the `waitForActionAttempt` option is enabled, the SDK: - Rejects with a `SeamActionAttemptTimeoutError` if the action attempt is still pending when the `timeout` is reached. - Both errors expose an `actionAttempt` property. +The `ActionAttempt` type is a union discriminated by `action_type` and `status`. +The `error` and `result` properties are typed as `null` +except for the status that populates them, +so narrow on the `status` before reading them: + +```ts +const actionAttempt = await seam.locks.unlockDoor( + { device_id }, + { waitForActionAttempt: false }, +) + +if (actionAttempt.status === 'success') { + console.log(actionAttempt.result) // The result is non-null here. +} + +if (actionAttempt.status === 'error') { + console.log(actionAttempt.error.message) // The error is non-null here. +} +``` + +Waiting for an action attempt resolves with the successful action attempt, +so after checking `status === 'success'` the `result` is immediately usable. +Use the `SucceededActionAttempt` and `FailedActionAttempt` types +to extract the success and error members from any action attempt type. + If you already have an action attempt ID and want to wait for it to resolve, simply use