@seamapi/types 1.242.0 → 1.242.1

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 (43) hide show
  1. package/dist/connect.cjs +77 -42
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +120 -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.d.ts +6 -6
  14. package/lib/seam/connect/models/devices/phone.d.ts +5 -5
  15. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +5 -5
  16. package/lib/seam/connect/models/thermostats/climate-preset.d.ts +3 -3
  17. package/lib/seam/connect/models/thermostats/climate-preset.js +1 -1
  18. package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
  19. package/lib/seam/connect/models/thermostats/index.d.ts +1 -1
  20. package/lib/seam/connect/models/thermostats/index.js +1 -1
  21. package/lib/seam/connect/models/thermostats/index.js.map +1 -1
  22. package/lib/seam/connect/models/thermostats/{climate-setting-schedule.js → thermostat-schedule.js} +1 -1
  23. package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -0
  24. package/lib/seam/connect/openapi.d.ts +9 -0
  25. package/lib/seam/connect/openapi.js +46 -21
  26. package/lib/seam/connect/openapi.js.map +1 -1
  27. package/lib/seam/connect/route-types.d.ts +64 -36
  28. package/lib/seam/devicedb/models/device-model.d.ts +59 -24
  29. package/lib/seam/devicedb/models/device-model.js +9 -6
  30. package/lib/seam/devicedb/models/device-model.js.map +1 -1
  31. package/lib/seam/devicedb/route-specs.d.ts +56 -38
  32. package/lib/seam/devicedb/route-types.d.ts +8 -8
  33. package/package.json +1 -1
  34. package/src/lib/seam/connect/models/acs/acs-system.ts +32 -24
  35. package/src/lib/seam/connect/models/thermostats/climate-preset.ts +1 -1
  36. package/src/lib/seam/connect/models/thermostats/index.ts +1 -1
  37. package/src/lib/seam/connect/openapi.ts +49 -21
  38. package/src/lib/seam/connect/route-types.ts +68 -36
  39. package/src/lib/seam/devicedb/models/device-model.ts +24 -19
  40. package/src/lib/seam/devicedb/route-types.ts +8 -8
  41. package/lib/seam/connect/models/thermostats/climate-setting-schedule.js.map +0 -1
  42. /package/lib/seam/connect/models/thermostats/{climate-setting-schedule.d.ts → thermostat-schedule.d.ts} +0 -0
  43. /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
  });
@@ -1220,27 +1223,34 @@ var visionline_instance_unreachable = common_acs_system_error.extend({
1220
1223
  }).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
1224
  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
1225
  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(
1226
+ var salto_ks_subscription_limit_exceeded = common_acs_system_error.extend({
1227
+ error_code: zod.z.literal("salto_ks_subscription_limit_exceeded").describe(
1225
1228
  "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
1229
  )
1227
1230
  });
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"
1231
+ var acs_system_disconnected = common_acs_system_error.extend({
1232
+ error_code: zod.z.literal("acs_system_disconnected").describe(
1233
+ "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."
1234
+ )
1235
+ });
1236
+ var account_disconnected = common_acs_system_error.extend({
1237
+ error_code: zod.z.literal("account_disconnected").describe(
1238
+ "Indicates that the login credentials are invalid. Please reconnect the account using the Connect Webview to restore access."
1231
1239
  )
1232
1240
  });
1233
1241
  var acs_system_error = zod.z.union([
1234
1242
  seam_bridge_disconnected,
1235
1243
  visionline_instance_unreachable,
1236
- salto_site_user_limit_reached,
1237
- salto_seam_integration_blocked
1244
+ salto_ks_subscription_limit_exceeded,
1245
+ acs_system_disconnected,
1246
+ account_disconnected
1238
1247
  ]).describe("Error associated with the `acs_system`.");
1239
1248
  zod.z.object({
1240
1249
  seam_bridge_disconnected: seam_bridge_disconnected.optional().nullable(),
1241
1250
  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()
1251
+ salto_ks_subscription_limit_exceeded: salto_ks_subscription_limit_exceeded.optional().nullable(),
1252
+ acs_system_disconnected: acs_system_disconnected.optional().nullable(),
1253
+ account_disconnected: account_disconnected.optional().nullable()
1244
1254
  });
1245
1255
  var common_acs_system_warning = zod.z.object({
1246
1256
  created_at: zod.z.string().datetime().describe("Date and time at which Seam created the warning."),
@@ -1248,17 +1258,17 @@ var common_acs_system_warning = zod.z.object({
1248
1258
  "Detailed description of the warning. Provides insights into the issue and potentially how to rectify it."
1249
1259
  )
1250
1260
  });
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."
1261
+ var salto_ks_subscription_limit_almost_reached = common_acs_system_warning.extend({
1262
+ warning_code: zod.z.literal("salto_ks_subscription_limit_almost_reached").describe(
1263
+ "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
1264
  )
1255
1265
  });
1256
1266
  var acs_system_warning = (
1257
1267
  // z.union([
1258
- salto_site_user_limit_almost_reached.describe("Warning associated with the `acs_system`.")
1268
+ salto_ks_subscription_limit_almost_reached.describe("Warning associated with the `acs_system`.")
1259
1269
  );
1260
1270
  zod.z.object({
1261
- salto_site_user_limit_almost_reached: salto_site_user_limit_almost_reached.optional().nullable()
1271
+ salto_ks_subscription_limit_almost_reached: salto_ks_subscription_limit_almost_reached.optional().nullable()
1262
1272
  });
1263
1273
  var acs_system = zod.z.object({
1264
1274
  acs_system_id: zod.z.string().uuid().describe("ID of the `acs_system`."),
@@ -2857,7 +2867,7 @@ var openapi_default = {
2857
2867
  },
2858
2868
  error_code: {
2859
2869
  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"],
2870
+ enum: ["salto_ks_subscription_limit_exceeded"],
2861
2871
  type: "string"
2862
2872
  },
2863
2873
  message: {
@@ -2876,8 +2886,28 @@ var openapi_default = {
2876
2886
  type: "string"
2877
2887
  },
2878
2888
  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"],
2889
+ 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.",
2890
+ enum: ["acs_system_disconnected"],
2891
+ type: "string"
2892
+ },
2893
+ message: {
2894
+ description: "Detailed description of the error. Provides insights into the issue and potentially how to rectify it.",
2895
+ type: "string"
2896
+ }
2897
+ },
2898
+ required: ["created_at", "message", "error_code"],
2899
+ type: "object"
2900
+ },
2901
+ {
2902
+ properties: {
2903
+ created_at: {
2904
+ description: "Date and time at which Seam created the error.",
2905
+ format: "date-time",
2906
+ type: "string"
2907
+ },
2908
+ error_code: {
2909
+ description: "Indicates that the login credentials are invalid. Please reconnect the account using the Connect Webview to restore access.",
2910
+ enum: ["account_disconnected"],
2881
2911
  type: "string"
2882
2912
  },
2883
2913
  message: {
@@ -2963,8 +2993,8 @@ var openapi_default = {
2963
2993
  type: "string"
2964
2994
  },
2965
2995
  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"],
2996
+ 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.",
2997
+ enum: ["salto_ks_subscription_limit_almost_reached"],
2968
2998
  type: "string"
2969
2999
  }
2970
3000
  },
@@ -5490,13 +5520,16 @@ var openapi_default = {
5490
5520
  type: "string"
5491
5521
  },
5492
5522
  manual_override_allowed: { type: "boolean" },
5493
- name: { nullable: true, type: "string" }
5523
+ name: {
5524
+ default: null,
5525
+ nullable: true,
5526
+ type: "string"
5527
+ }
5494
5528
  },
5495
5529
  required: [
5496
5530
  "climate_preset_key",
5497
5531
  "can_edit",
5498
5532
  "can_delete",
5499
- "name",
5500
5533
  "display_name",
5501
5534
  "manual_override_allowed"
5502
5535
  ],
@@ -5542,7 +5575,11 @@ var openapi_default = {
5542
5575
  type: "string"
5543
5576
  },
5544
5577
  manual_override_allowed: { type: "boolean" },
5545
- name: { nullable: true, type: "string" }
5578
+ name: {
5579
+ default: null,
5580
+ nullable: true,
5581
+ type: "string"
5582
+ }
5546
5583
  },
5547
5584
  type: "object"
5548
5585
  },
@@ -5578,7 +5615,11 @@ var openapi_default = {
5578
5615
  type: "string"
5579
5616
  },
5580
5617
  manual_override_allowed: { type: "boolean" },
5581
- name: { nullable: true, type: "string" }
5618
+ name: {
5619
+ default: null,
5620
+ nullable: true,
5621
+ type: "string"
5622
+ }
5582
5623
  },
5583
5624
  type: "object",
5584
5625
  "x-deprecated": "use fallback_climate_preset_key to specify a fallback climate preset instead."
@@ -14797,12 +14838,11 @@ var openapi_default = {
14797
14838
  type: "string"
14798
14839
  },
14799
14840
  manual_override_allowed: { type: "boolean" },
14800
- name: { nullable: true, type: "string" }
14841
+ name: { default: null, nullable: true, type: "string" }
14801
14842
  },
14802
14843
  required: [
14803
14844
  "device_id",
14804
14845
  "climate_preset_key",
14805
- "name",
14806
14846
  "manual_override_allowed"
14807
14847
  ],
14808
14848
  type: "object"
@@ -14847,13 +14887,12 @@ var openapi_default = {
14847
14887
  type: "string"
14848
14888
  },
14849
14889
  manual_override_allowed: { type: "boolean" },
14850
- name: { nullable: true, type: "string" }
14890
+ name: { default: null, nullable: true, type: "string" }
14851
14891
  },
14852
14892
  required: [
14853
14893
  "climate_preset_key",
14854
14894
  "can_edit",
14855
14895
  "can_delete",
14856
- "name",
14857
14896
  "display_name",
14858
14897
  "manual_override_allowed"
14859
14898
  ],
@@ -15854,12 +15893,11 @@ var openapi_default = {
15854
15893
  type: "string"
15855
15894
  },
15856
15895
  manual_override_allowed: { type: "boolean" },
15857
- name: { nullable: true, type: "string" }
15896
+ name: { default: null, nullable: true, type: "string" }
15858
15897
  },
15859
15898
  required: [
15860
15899
  "device_id",
15861
15900
  "climate_preset_key",
15862
- "name",
15863
15901
  "manual_override_allowed"
15864
15902
  ],
15865
15903
  type: "object"
@@ -15904,13 +15942,12 @@ var openapi_default = {
15904
15942
  type: "string"
15905
15943
  },
15906
15944
  manual_override_allowed: { type: "boolean" },
15907
- name: { nullable: true, type: "string" }
15945
+ name: { default: null, nullable: true, type: "string" }
15908
15946
  },
15909
15947
  required: [
15910
15948
  "climate_preset_key",
15911
15949
  "can_edit",
15912
15950
  "can_delete",
15913
- "name",
15914
15951
  "display_name",
15915
15952
  "manual_override_allowed"
15916
15953
  ],
@@ -15968,12 +16005,11 @@ var openapi_default = {
15968
16005
  type: "string"
15969
16006
  },
15970
16007
  manual_override_allowed: { type: "boolean" },
15971
- name: { nullable: true, type: "string" }
16008
+ name: { default: null, nullable: true, type: "string" }
15972
16009
  },
15973
16010
  required: [
15974
16011
  "device_id",
15975
16012
  "climate_preset_key",
15976
- "name",
15977
16013
  "manual_override_allowed"
15978
16014
  ],
15979
16015
  type: "object"
@@ -16018,13 +16054,12 @@ var openapi_default = {
16018
16054
  type: "string"
16019
16055
  },
16020
16056
  manual_override_allowed: { type: "boolean" },
16021
- name: { nullable: true, type: "string" }
16057
+ name: { default: null, nullable: true, type: "string" }
16022
16058
  },
16023
16059
  required: [
16024
16060
  "climate_preset_key",
16025
16061
  "can_edit",
16026
16062
  "can_delete",
16027
- "name",
16028
16063
  "display_name",
16029
16064
  "manual_override_allowed"
16030
16065
  ],