@seamapi/types 1.242.0 → 1.243.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.
Files changed (47) hide show
  1. package/dist/connect.cjs +134 -45
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +484 -62
  4. package/dist/devicedb.cjs +9 -6
  5. package/dist/devicedb.cjs.map +1 -1
  6. package/dist/devicedb.d.cts +123 -70
  7. package/lib/seam/connect/models/acs/acs-system.d.ts +86 -42
  8. package/lib/seam/connect/models/acs/acs-system.js +23 -20
  9. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  10. package/lib/seam/connect/models/acs/acs-user.d.ts +8 -8
  11. package/lib/seam/connect/models/devices/capability-properties/index.d.ts +5 -5
  12. package/lib/seam/connect/models/devices/capability-properties/thermostat.d.ts +5 -5
  13. package/lib/seam/connect/models/devices/device-metadata.d.ts +78 -0
  14. package/lib/seam/connect/models/devices/device-metadata.js +14 -0
  15. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  16. package/lib/seam/connect/models/devices/device.d.ts +108 -6
  17. package/lib/seam/connect/models/devices/phone.d.ts +83 -5
  18. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +83 -5
  19. package/lib/seam/connect/models/thermostats/climate-preset.d.ts +3 -3
  20. package/lib/seam/connect/models/thermostats/climate-preset.js +1 -1
  21. package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
  22. package/lib/seam/connect/models/thermostats/index.d.ts +1 -1
  23. package/lib/seam/connect/models/thermostats/index.js +1 -1
  24. package/lib/seam/connect/models/thermostats/index.js.map +1 -1
  25. package/lib/seam/connect/models/thermostats/{climate-setting-schedule.js → thermostat-schedule.js} +1 -1
  26. package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -0
  27. package/lib/seam/connect/openapi.d.ts +49 -0
  28. package/lib/seam/connect/openapi.js +87 -22
  29. package/lib/seam/connect/openapi.js.map +1 -1
  30. package/lib/seam/connect/route-types.d.ts +208 -36
  31. package/lib/seam/devicedb/models/device-model.d.ts +59 -24
  32. package/lib/seam/devicedb/models/device-model.js +9 -6
  33. package/lib/seam/devicedb/models/device-model.js.map +1 -1
  34. package/lib/seam/devicedb/route-specs.d.ts +56 -38
  35. package/lib/seam/devicedb/route-types.d.ts +8 -8
  36. package/package.json +1 -1
  37. package/src/lib/seam/connect/models/acs/acs-system.ts +32 -24
  38. package/src/lib/seam/connect/models/devices/device-metadata.ts +16 -0
  39. package/src/lib/seam/connect/models/thermostats/climate-preset.ts +1 -1
  40. package/src/lib/seam/connect/models/thermostats/index.ts +1 -1
  41. package/src/lib/seam/connect/openapi.ts +90 -22
  42. package/src/lib/seam/connect/route-types.ts +236 -36
  43. package/src/lib/seam/devicedb/models/device-model.ts +24 -19
  44. package/src/lib/seam/devicedb/route-types.ts +8 -8
  45. package/lib/seam/connect/models/thermostats/climate-setting-schedule.js.map +0 -1
  46. /package/lib/seam/connect/models/thermostats/{climate-setting-schedule.d.ts → thermostat-schedule.d.ts} +0 -0
  47. /package/src/lib/seam/connect/models/thermostats/{climate-setting-schedule.ts → thermostat-schedule.ts} +0 -0
package/dist/connect.cjs CHANGED
@@ -143,7 +143,7 @@ var climate_preset = zod.z.object({
143
143
  climate_preset_key: zod.z.string(),
144
144
  can_edit: zod.z.boolean(),
145
145
  can_delete: zod.z.boolean(),
146
- name: zod.z.string().nullable(),
146
+ name: zod.z.string().nullable().default(null),
147
147
  display_name: zod.z.string(),
148
148
  fan_mode_setting: fan_mode_setting.optional(),
149
149
  hvac_mode_setting: hvac_mode_setting.optional(),
@@ -339,11 +339,7 @@ var smartlock = zod.z.object({
339
339
  can_remotely_lock: true,
340
340
  can_remotely_unlock: true,
341
341
  can_program_offline_access_codes: true,
342
- can_program_online_access_codes: true,
343
- can_hvac_heat: true,
344
- can_hvac_cool: true,
345
- can_hvac_heat_cool: true,
346
- can_turn_off_hvac: true
342
+ can_program_online_access_codes: true
347
343
  })
348
344
  );
349
345
  var sensor = zod.z.object({
@@ -369,7 +365,14 @@ var thermostat = zod.z.object({
369
365
  software_features: zod.z.object({
370
366
  can_program_climate_schedules: zod.z.boolean()
371
367
  })
372
- });
368
+ }).merge(
369
+ device_model_capability_flags.pick({
370
+ can_hvac_heat: true,
371
+ can_hvac_cool: true,
372
+ can_hvac_heat_cool: true,
373
+ can_turn_off_hvac: true
374
+ })
375
+ );
373
376
  var relay = zod.z.object({
374
377
  main_category: zod.z.literal(device_category.enum.relay)
375
378
  });
@@ -558,7 +561,21 @@ var device_metadata = zod.z.object({
558
561
  ttlock_metadata: zod.z.object({
559
562
  lock_id: zod.z.number(),
560
563
  lock_alias: zod.z.string(),
561
- feature_value: zod.z.string()
564
+ feature_value: zod.z.string(),
565
+ features: zod.z.object({
566
+ passcode: zod.z.boolean(),
567
+ passcode_management: zod.z.boolean(),
568
+ unlock_via_gateway: zod.z.boolean(),
569
+ lock_command: zod.z.boolean(),
570
+ incomplete_keyboard_passcode: zod.z.boolean()
571
+ }),
572
+ has_gateway: zod.z.boolean().optional(),
573
+ wireless_keypads: zod.z.array(
574
+ zod.z.object({
575
+ wireless_keypad_id: zod.z.number(),
576
+ wireless_keypad_name: zod.z.string()
577
+ })
578
+ ).optional()
562
579
  }),
563
580
  seam_bridge_metadata: zod.z.object({
564
581
  unlock_method: zod.z.enum(["bridge", "doorking"]).optional(),
@@ -1220,27 +1237,34 @@ var visionline_instance_unreachable = common_acs_system_error.extend({
1220
1237
  }).describe(`Indicates that the Seam Bridge is functioning correctly and the Seam API can communicate with the Seam Bridge, but the Seam API cannot connect to the on-premises [Visionline access control system](https://docs.seam.co/latest/device-and-system-integration-guides/assa-abloy-visionline-access-control-system).
1221
1238
  For example, the IP address of the on-premises access control system may be set incorrectly within the Seam [workspace](https://docs.seam.co/latest/core-concepts/workspaces).
1222
1239
  See also [Troubleshooting Your Access Control System](https://docs.seam.co/latest/capability-guides/capability-guides/access-systems/troubleshooting-your-access-control-system#acs_system.errors.visionline_instance_unreachable).`);
1223
- var salto_site_user_limit_reached = common_acs_system_error.extend({
1224
- error_code: zod.z.literal("salto_site_user_limit_reached").describe(
1240
+ var salto_ks_subscription_limit_exceeded = common_acs_system_error.extend({
1241
+ error_code: zod.z.literal("salto_ks_subscription_limit_exceeded").describe(
1225
1242
  "Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit."
1226
1243
  )
1227
1244
  });
1228
- var salto_seam_integration_blocked = common_acs_system_error.extend({
1229
- error_code: zod.z.literal("salto_seam_integration_blocked").describe(
1230
- "Indicates that the Seam Integration user site is blocked. This means that Seam does not have permission to access Salto resources. Go to Salto Dashboard to remove 'Seam Integration' block"
1245
+ var acs_system_disconnected = common_acs_system_error.extend({
1246
+ error_code: zod.z.literal("acs_system_disconnected").describe(
1247
+ "Indicates that the access system has been disconnected. Please refer to [this guide](https://docs.seam.co/latest/capability-guides/access-systems/troubleshooting-your-access-control-system guide) to resolve the issue."
1248
+ )
1249
+ });
1250
+ var account_disconnected = common_acs_system_error.extend({
1251
+ error_code: zod.z.literal("account_disconnected").describe(
1252
+ "Indicates that the login credentials are invalid. Please reconnect the account using the Connect Webview to restore access."
1231
1253
  )
1232
1254
  });
1233
1255
  var acs_system_error = zod.z.union([
1234
1256
  seam_bridge_disconnected,
1235
1257
  visionline_instance_unreachable,
1236
- salto_site_user_limit_reached,
1237
- salto_seam_integration_blocked
1258
+ salto_ks_subscription_limit_exceeded,
1259
+ acs_system_disconnected,
1260
+ account_disconnected
1238
1261
  ]).describe("Error associated with the `acs_system`.");
1239
1262
  zod.z.object({
1240
1263
  seam_bridge_disconnected: seam_bridge_disconnected.optional().nullable(),
1241
1264
  visionline_instance_unreachable: visionline_instance_unreachable.optional().nullable(),
1242
- salto_site_user_limit_reached: salto_site_user_limit_reached.optional().nullable(),
1243
- salto_seam_integration_blocked: salto_seam_integration_blocked.optional().nullable()
1265
+ salto_ks_subscription_limit_exceeded: salto_ks_subscription_limit_exceeded.optional().nullable(),
1266
+ acs_system_disconnected: acs_system_disconnected.optional().nullable(),
1267
+ account_disconnected: account_disconnected.optional().nullable()
1244
1268
  });
1245
1269
  var common_acs_system_warning = zod.z.object({
1246
1270
  created_at: zod.z.string().datetime().describe("Date and time at which Seam created the warning."),
@@ -1248,17 +1272,17 @@ var common_acs_system_warning = zod.z.object({
1248
1272
  "Detailed description of the warning. Provides insights into the issue and potentially how to rectify it."
1249
1273
  )
1250
1274
  });
1251
- var salto_site_user_limit_almost_reached = common_acs_system_warning.extend({
1252
- warning_code: zod.z.literal("salto_site_user_limit_almost_reached").describe(
1253
- "You have reached more than 80% of the maximum number of users allowed for your site; Please contact Salto support to increase your user limit."
1275
+ var salto_ks_subscription_limit_almost_reached = common_acs_system_warning.extend({
1276
+ warning_code: zod.z.literal("salto_ks_subscription_limit_almost_reached").describe(
1277
+ "Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this."
1254
1278
  )
1255
1279
  });
1256
1280
  var acs_system_warning = (
1257
1281
  // z.union([
1258
- salto_site_user_limit_almost_reached.describe("Warning associated with the `acs_system`.")
1282
+ salto_ks_subscription_limit_almost_reached.describe("Warning associated with the `acs_system`.")
1259
1283
  );
1260
1284
  zod.z.object({
1261
- salto_site_user_limit_almost_reached: salto_site_user_limit_almost_reached.optional().nullable()
1285
+ salto_ks_subscription_limit_almost_reached: salto_ks_subscription_limit_almost_reached.optional().nullable()
1262
1286
  });
1263
1287
  var acs_system = zod.z.object({
1264
1288
  acs_system_id: zod.z.string().uuid().describe("ID of the `acs_system`."),
@@ -2857,7 +2881,27 @@ var openapi_default = {
2857
2881
  },
2858
2882
  error_code: {
2859
2883
  description: "Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit.",
2860
- enum: ["salto_site_user_limit_reached"],
2884
+ enum: ["salto_ks_subscription_limit_exceeded"],
2885
+ type: "string"
2886
+ },
2887
+ message: {
2888
+ description: "Detailed description of the error. Provides insights into the issue and potentially how to rectify it.",
2889
+ type: "string"
2890
+ }
2891
+ },
2892
+ required: ["created_at", "message", "error_code"],
2893
+ type: "object"
2894
+ },
2895
+ {
2896
+ properties: {
2897
+ created_at: {
2898
+ description: "Date and time at which Seam created the error.",
2899
+ format: "date-time",
2900
+ type: "string"
2901
+ },
2902
+ error_code: {
2903
+ description: "Indicates that the access system has been disconnected. Please refer to [this guide](https://docs.seam.co/latest/capability-guides/access-systems/troubleshooting-your-access-control-system guide) to resolve the issue.",
2904
+ enum: ["acs_system_disconnected"],
2861
2905
  type: "string"
2862
2906
  },
2863
2907
  message: {
@@ -2876,8 +2920,8 @@ var openapi_default = {
2876
2920
  type: "string"
2877
2921
  },
2878
2922
  error_code: {
2879
- description: "Indicates that the Seam Integration user site is blocked. This means that Seam does not have permission to access Salto resources. Go to Salto Dashboard to remove 'Seam Integration' block",
2880
- enum: ["salto_seam_integration_blocked"],
2923
+ description: "Indicates that the login credentials are invalid. Please reconnect the account using the Connect Webview to restore access.",
2924
+ enum: ["account_disconnected"],
2881
2925
  type: "string"
2882
2926
  },
2883
2927
  message: {
@@ -2963,8 +3007,8 @@ var openapi_default = {
2963
3007
  type: "string"
2964
3008
  },
2965
3009
  warning_code: {
2966
- description: "You have reached more than 80% of the maximum number of users allowed for your site; Please contact Salto support to increase your user limit.",
2967
- enum: ["salto_site_user_limit_almost_reached"],
3010
+ description: "Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this.",
3011
+ enum: ["salto_ks_subscription_limit_almost_reached"],
2968
3012
  type: "string"
2969
3013
  }
2970
3014
  },
@@ -5310,10 +5354,50 @@ var openapi_default = {
5310
5354
  ttlock_metadata: {
5311
5355
  properties: {
5312
5356
  feature_value: { type: "string" },
5357
+ features: {
5358
+ properties: {
5359
+ incomplete_keyboard_passcode: { type: "boolean" },
5360
+ lock_command: { type: "boolean" },
5361
+ passcode: { type: "boolean" },
5362
+ passcode_management: { type: "boolean" },
5363
+ unlock_via_gateway: { type: "boolean" }
5364
+ },
5365
+ required: [
5366
+ "passcode",
5367
+ "passcode_management",
5368
+ "unlock_via_gateway",
5369
+ "lock_command",
5370
+ "incomplete_keyboard_passcode"
5371
+ ],
5372
+ type: "object"
5373
+ },
5374
+ has_gateway: { type: "boolean" },
5313
5375
  lock_alias: { type: "string" },
5314
- lock_id: { format: "float", type: "number" }
5376
+ lock_id: { format: "float", type: "number" },
5377
+ wireless_keypads: {
5378
+ items: {
5379
+ properties: {
5380
+ wireless_keypad_id: {
5381
+ format: "float",
5382
+ type: "number"
5383
+ },
5384
+ wireless_keypad_name: { type: "string" }
5385
+ },
5386
+ required: [
5387
+ "wireless_keypad_id",
5388
+ "wireless_keypad_name"
5389
+ ],
5390
+ type: "object"
5391
+ },
5392
+ type: "array"
5393
+ }
5315
5394
  },
5316
- required: ["lock_id", "lock_alias", "feature_value"],
5395
+ required: [
5396
+ "lock_id",
5397
+ "lock_alias",
5398
+ "feature_value",
5399
+ "features"
5400
+ ],
5317
5401
  type: "object"
5318
5402
  },
5319
5403
  two_n_metadata: {
@@ -5490,13 +5574,16 @@ var openapi_default = {
5490
5574
  type: "string"
5491
5575
  },
5492
5576
  manual_override_allowed: { type: "boolean" },
5493
- name: { nullable: true, type: "string" }
5577
+ name: {
5578
+ default: null,
5579
+ nullable: true,
5580
+ type: "string"
5581
+ }
5494
5582
  },
5495
5583
  required: [
5496
5584
  "climate_preset_key",
5497
5585
  "can_edit",
5498
5586
  "can_delete",
5499
- "name",
5500
5587
  "display_name",
5501
5588
  "manual_override_allowed"
5502
5589
  ],
@@ -5542,7 +5629,11 @@ var openapi_default = {
5542
5629
  type: "string"
5543
5630
  },
5544
5631
  manual_override_allowed: { type: "boolean" },
5545
- name: { nullable: true, type: "string" }
5632
+ name: {
5633
+ default: null,
5634
+ nullable: true,
5635
+ type: "string"
5636
+ }
5546
5637
  },
5547
5638
  type: "object"
5548
5639
  },
@@ -5578,7 +5669,11 @@ var openapi_default = {
5578
5669
  type: "string"
5579
5670
  },
5580
5671
  manual_override_allowed: { type: "boolean" },
5581
- name: { nullable: true, type: "string" }
5672
+ name: {
5673
+ default: null,
5674
+ nullable: true,
5675
+ type: "string"
5676
+ }
5582
5677
  },
5583
5678
  type: "object",
5584
5679
  "x-deprecated": "use fallback_climate_preset_key to specify a fallback climate preset instead."
@@ -14797,12 +14892,11 @@ var openapi_default = {
14797
14892
  type: "string"
14798
14893
  },
14799
14894
  manual_override_allowed: { type: "boolean" },
14800
- name: { nullable: true, type: "string" }
14895
+ name: { default: null, nullable: true, type: "string" }
14801
14896
  },
14802
14897
  required: [
14803
14898
  "device_id",
14804
14899
  "climate_preset_key",
14805
- "name",
14806
14900
  "manual_override_allowed"
14807
14901
  ],
14808
14902
  type: "object"
@@ -14847,13 +14941,12 @@ var openapi_default = {
14847
14941
  type: "string"
14848
14942
  },
14849
14943
  manual_override_allowed: { type: "boolean" },
14850
- name: { nullable: true, type: "string" }
14944
+ name: { default: null, nullable: true, type: "string" }
14851
14945
  },
14852
14946
  required: [
14853
14947
  "climate_preset_key",
14854
14948
  "can_edit",
14855
14949
  "can_delete",
14856
- "name",
14857
14950
  "display_name",
14858
14951
  "manual_override_allowed"
14859
14952
  ],
@@ -15854,12 +15947,11 @@ var openapi_default = {
15854
15947
  type: "string"
15855
15948
  },
15856
15949
  manual_override_allowed: { type: "boolean" },
15857
- name: { nullable: true, type: "string" }
15950
+ name: { default: null, nullable: true, type: "string" }
15858
15951
  },
15859
15952
  required: [
15860
15953
  "device_id",
15861
15954
  "climate_preset_key",
15862
- "name",
15863
15955
  "manual_override_allowed"
15864
15956
  ],
15865
15957
  type: "object"
@@ -15904,13 +15996,12 @@ var openapi_default = {
15904
15996
  type: "string"
15905
15997
  },
15906
15998
  manual_override_allowed: { type: "boolean" },
15907
- name: { nullable: true, type: "string" }
15999
+ name: { default: null, nullable: true, type: "string" }
15908
16000
  },
15909
16001
  required: [
15910
16002
  "climate_preset_key",
15911
16003
  "can_edit",
15912
16004
  "can_delete",
15913
- "name",
15914
16005
  "display_name",
15915
16006
  "manual_override_allowed"
15916
16007
  ],
@@ -15968,12 +16059,11 @@ var openapi_default = {
15968
16059
  type: "string"
15969
16060
  },
15970
16061
  manual_override_allowed: { type: "boolean" },
15971
- name: { nullable: true, type: "string" }
16062
+ name: { default: null, nullable: true, type: "string" }
15972
16063
  },
15973
16064
  required: [
15974
16065
  "device_id",
15975
16066
  "climate_preset_key",
15976
- "name",
15977
16067
  "manual_override_allowed"
15978
16068
  ],
15979
16069
  type: "object"
@@ -16018,13 +16108,12 @@ var openapi_default = {
16018
16108
  type: "string"
16019
16109
  },
16020
16110
  manual_override_allowed: { type: "boolean" },
16021
- name: { nullable: true, type: "string" }
16111
+ name: { default: null, nullable: true, type: "string" }
16022
16112
  },
16023
16113
  required: [
16024
16114
  "climate_preset_key",
16025
16115
  "can_edit",
16026
16116
  "can_delete",
16027
- "name",
16028
16117
  "display_name",
16029
16118
  "manual_override_allowed"
16030
16119
  ],