@seamapi/types 1.1040.0 → 1.1043.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50085,10 +50085,13 @@ export type Routes = {
50085
50085
  [x: string]: string | boolean;
50086
50086
  } | undefined;
50087
50087
  event_type: 'device.low_battery';
50088
- /** Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. */
50088
+ /** Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
50089
+ * @deprecated Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.*/
50089
50090
  battery_level: number;
50090
- /** 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. */
50091
- battery_source?: ('lock' | 'accessory_keypad') | undefined;
50091
+ /** Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. */
50092
+ device_battery_level?: number | undefined;
50093
+ /** Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. */
50094
+ accessory_keypad_battery_level?: number | undefined;
50092
50095
  } | {
50093
50096
  /** ID of the event. */
50094
50097
  event_id: string;
@@ -53713,10 +53716,13 @@ export type Routes = {
53713
53716
  [x: string]: string | boolean;
53714
53717
  } | undefined;
53715
53718
  event_type: 'device.low_battery';
53716
- /** Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. */
53719
+ /** Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
53720
+ * @deprecated Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.*/
53717
53721
  battery_level: number;
53718
- /** 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. */
53719
- battery_source?: ('lock' | 'accessory_keypad') | undefined;
53722
+ /** Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. */
53723
+ device_battery_level?: number | undefined;
53724
+ /** Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. */
53725
+ accessory_keypad_battery_level?: number | undefined;
53720
53726
  } | {
53721
53727
  /** ID of the event. */
53722
53728
  event_id: string;
@@ -80026,7 +80032,7 @@ export type Routes = {
80026
80032
  queryParams: {};
80027
80033
  jsonBody: {
80028
80034
  /** Name of the workspace feature flag to update. */
80029
- feature_flag_name: 'RESERVATION_LEGACY' | 'EXPERIMENTAL_DASHBOARD_API_ENABLED' | 'ICAL_CONNECTOR' | 'VISIONLINE_SERIALIZE_BRIDGE_REQUESTS' | 'SALTO_KS_DEVICES_AND_ENTRANCES_FOR_SPACES' | 'MANAGE_DEVICES_CONFIRMATION_MODAL' | 'RECLAIM_ORPHANED_BACKUP_ACCESS_CODES' | 'RECONCILE_ORPHANED_SMARTTHINGS_ACCESS_CODES' | 'LYNX_MIGRATION_ENABLED' | 'AURORA_CUSTOMER_FILTER_ENABLED' | 'ACCESS_METHOD_DEADLINE_ERRORS' | 'ACCESS_CODE_DEADLINE_LIFECYCLE' | 'GUARD_MATERIALIZATION_ON_UNREACHABLE_DEVICE' | 'TARGETED_ACCESS_GRANT_ISSUANCE';
80035
+ feature_flag_name: 'RESERVATION_LEGACY' | 'EXPERIMENTAL_DASHBOARD_API_ENABLED' | 'ICAL_CONNECTOR' | 'VISIONLINE_SERIALIZE_BRIDGE_REQUESTS' | 'SALTO_KS_DEVICES_AND_ENTRANCES_FOR_SPACES' | 'MANAGE_DEVICES_CONFIRMATION_MODAL' | 'RECLAIM_ORPHANED_BACKUP_ACCESS_CODES' | 'RECONCILE_ORPHANED_SMARTTHINGS_ACCESS_CODES' | 'LYNX_MIGRATION_ENABLED' | 'AURORA_CUSTOMER_FILTER_ENABLED' | 'ACCESS_METHOD_DEADLINE_ERRORS' | 'ACCESS_CODE_DEADLINE_LIFECYCLE' | 'GUARD_MATERIALIZATION_ON_UNREACHABLE_DEVICE' | 'TARGETED_ACCESS_GRANT_ISSUANCE' | 'TRUTHFUL_CLIMATE_SETTING_SYNC';
80030
80036
  /** Whether the feature flag should be enabled for the workspace. */
80031
80037
  enabled: boolean;
80032
80038
  };
@@ -80034,7 +80040,7 @@ export type Routes = {
80034
80040
  formData: {};
80035
80041
  jsonResponse: {
80036
80042
  feature_flag: {
80037
- feature_flag_name: 'RESERVATION_LEGACY' | 'EXPERIMENTAL_DASHBOARD_API_ENABLED' | 'ICAL_CONNECTOR' | 'VISIONLINE_SERIALIZE_BRIDGE_REQUESTS' | 'SALTO_KS_DEVICES_AND_ENTRANCES_FOR_SPACES' | 'MANAGE_DEVICES_CONFIRMATION_MODAL' | 'RECLAIM_ORPHANED_BACKUP_ACCESS_CODES' | 'RECONCILE_ORPHANED_SMARTTHINGS_ACCESS_CODES' | 'LYNX_MIGRATION_ENABLED' | 'AURORA_CUSTOMER_FILTER_ENABLED' | 'ACCESS_METHOD_DEADLINE_ERRORS' | 'ACCESS_CODE_DEADLINE_LIFECYCLE' | 'GUARD_MATERIALIZATION_ON_UNREACHABLE_DEVICE' | 'TARGETED_ACCESS_GRANT_ISSUANCE';
80043
+ feature_flag_name: 'RESERVATION_LEGACY' | 'EXPERIMENTAL_DASHBOARD_API_ENABLED' | 'ICAL_CONNECTOR' | 'VISIONLINE_SERIALIZE_BRIDGE_REQUESTS' | 'SALTO_KS_DEVICES_AND_ENTRANCES_FOR_SPACES' | 'MANAGE_DEVICES_CONFIRMATION_MODAL' | 'RECLAIM_ORPHANED_BACKUP_ACCESS_CODES' | 'RECONCILE_ORPHANED_SMARTTHINGS_ACCESS_CODES' | 'LYNX_MIGRATION_ENABLED' | 'AURORA_CUSTOMER_FILTER_ENABLED' | 'ACCESS_METHOD_DEADLINE_ERRORS' | 'ACCESS_CODE_DEADLINE_LIFECYCLE' | 'GUARD_MATERIALIZATION_ON_UNREACHABLE_DEVICE' | 'TARGETED_ACCESS_GRANT_ISSUANCE' | 'TRUTHFUL_CLIMATE_SETTING_SYNC';
80038
80044
  enabled: boolean;
80039
80045
  };
80040
80046
  };
@@ -85409,10 +85415,13 @@ export type Routes = {
85409
85415
  [x: string]: string | boolean;
85410
85416
  } | undefined;
85411
85417
  event_type: 'device.low_battery';
85412
- /** Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. */
85418
+ /** Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
85419
+ * @deprecated Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.*/
85413
85420
  battery_level: number;
85414
- /** 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. */
85415
- battery_source?: ('lock' | 'accessory_keypad') | undefined;
85421
+ /** Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. */
85422
+ device_battery_level?: number | undefined;
85423
+ /** Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. */
85424
+ accessory_keypad_battery_level?: number | undefined;
85416
85425
  } | {
85417
85426
  /** ID of the event. */
85418
85427
  event_id: string;
@@ -125447,10 +125456,13 @@ export type Routes = {
125447
125456
  [x: string]: string | boolean;
125448
125457
  } | undefined;
125449
125458
  event_type: 'device.low_battery';
125450
- /** Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. */
125459
+ /** Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
125460
+ * @deprecated Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.*/
125451
125461
  battery_level: number;
125452
- /** 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. */
125453
- battery_source?: ('lock' | 'accessory_keypad') | undefined;
125462
+ /** Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. */
125463
+ device_battery_level?: number | undefined;
125464
+ /** Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. */
125465
+ accessory_keypad_battery_level?: number | undefined;
125454
125466
  } | {
125455
125467
  /** ID of the event. */
125456
125468
  event_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1040.0",
3
+ "version": "1.1043.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -77,7 +77,7 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@seamapi/blueprint": "^1.5.1",
80
+ "@seamapi/blueprint": "^1.9.0",
81
81
  "@types/node": "^24.10.9",
82
82
  "concurrently": "^9.2.0",
83
83
  "del-cli": "^7.0.0",
@@ -45,10 +45,20 @@ const device_battery_status = z
45
45
  'Battery status of the affected device, calculated from the numeric `battery_level` value.',
46
46
  )
47
47
 
48
- const battery_source = z
49
- .enum(['lock', 'accessory_keypad'])
48
+ const device_battery_level = z
49
+ .number()
50
+ .min(0)
51
+ .max(1)
52
+ .describe(
53
+ "Number in the range 0 to 1.0 indicating the affected device's own battery level, when known.",
54
+ )
55
+
56
+ const accessory_keypad_battery_level = z
57
+ .number()
58
+ .min(0)
59
+ .max(1)
50
60
  .describe(
51
- "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.",
61
+ "Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known.",
52
62
  )
53
63
 
54
64
  const disconnection_error_code = z
@@ -181,8 +191,14 @@ export type DeviceTamperedEvent = z.infer<typeof device_tampered_event>
181
191
 
182
192
  export const device_low_battery_event = device_event.extend({
183
193
  event_type: z.literal('device.low_battery'),
184
- battery_level,
185
- battery_source: battery_source.optional(),
194
+ battery_level: battery_level.describe(`
195
+ ---
196
+ deprecated: Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.
197
+ ---
198
+ Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
199
+ `),
200
+ device_battery_level: device_battery_level.optional(),
201
+ accessory_keypad_battery_level: accessory_keypad_battery_level.optional(),
186
202
  }).describe(`
187
203
  ---
188
204
  route_path: /devices