diff --git a/package-lock.json b/package-lock.json index c81c9f8f..0a64783c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^1.8.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1030.0", + "@seamapi/types": "1.1034.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", @@ -1133,9 +1133,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1030.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1030.0.tgz", - "integrity": "sha512-AP9cwDn0ueJ7R+/mocmHQ8GxiMcuyDw2bMz/yd+WN2+FEaj4dzdLiFMG8wu+1b0T3LnCeVfOYOD00iKElAZ5sg==", + "version": "1.1034.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1034.0.tgz", + "integrity": "sha512-lFw1r32E3bfSfHYv/ATadTFfubtOo2Vuf9Om88g0yBz85HOusqtl31hniK4oDXQWIacb8HTUpI69dOlzubSqqQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 443404cd..7313e20f 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@seamapi/blueprint": "^1.8.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1030.0", + "@seamapi/types": "1.1034.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", diff --git a/src/lib/resources/device.ts b/src/lib/resources/device.ts index f3c6b227..35975a1b 100644 --- a/src/lib/resources/device.ts +++ b/src/lib/resources/device.ts @@ -3208,6 +3208,24 @@ export type Device = { */ warning_code: 'accessory_keypad_setup_required' } /** + * Indicates that the accessory keypad paired with this lock has a low or critically low battery. Replace its batteries so guests can keep entering their access codes. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at: string + + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'accessory_keypad_low_battery' + } /** * Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. */ | { diff --git a/src/lib/resources/event.ts b/src/lib/resources/event.ts index 733552f0..7b3db820 100644 --- a/src/lib/resources/event.ts +++ b/src/lib/resources/event.ts @@ -4553,6 +4553,10 @@ export type SeamEvent = */ battery_level: number + /** + * Battery that dropped below the low threshold. `lock`: the lock's own battery. `accessory_keypad`: a paired accessory keypad's battery. Omitted for events emitted before this field existed, which always refer to the lock's own battery. + */ + battery_source?: 'lock' | 'accessory_keypad' | undefined /** * Custom metadata of the connected account, present when connected_account_id is provided. */ diff --git a/src/lib/resources/unmanaged-device.ts b/src/lib/resources/unmanaged-device.ts index c94c91db..c6fce057 100644 --- a/src/lib/resources/unmanaged-device.ts +++ b/src/lib/resources/unmanaged-device.ts @@ -1122,6 +1122,24 @@ export type UnmanagedDevice = { */ warning_code: 'accessory_keypad_setup_required' } /** + * Indicates that the accessory keypad paired with this lock has a low or critically low battery. Replace its batteries so guests can keep entering their access codes. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at: string + + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'accessory_keypad_low_battery' + } /** * Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. */ | {