@seamapi/types 1.386.0 → 1.386.2

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 (84) hide show
  1. package/dist/connect.cjs +2788 -791
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +7673 -1304
  4. package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +1 -1
  5. package/lib/seam/connect/models/access-grants/access-method.d.ts +9 -3
  6. package/lib/seam/connect/models/access-grants/access-method.js +9 -1
  7. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  8. package/lib/seam/connect/models/acs/acs-credential.d.ts +2 -2
  9. package/lib/seam/connect/models/acs/acs-system.d.ts +36 -0
  10. package/lib/seam/connect/models/acs/acs-system.js +6 -0
  11. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  12. package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +0 -12
  13. package/lib/seam/connect/models/acs/acs-users/acs-user.js +4 -22
  14. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
  15. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js +43 -18
  16. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js.map +1 -1
  17. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +189 -6
  18. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  19. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  20. package/lib/seam/connect/models/action-attempts/encode-access-method.d.ts +186 -0
  21. package/lib/seam/connect/models/action-attempts/encode-access-method.js +42 -0
  22. package/lib/seam/connect/models/action-attempts/encode-access-method.js.map +1 -0
  23. package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +6 -6
  24. package/lib/seam/connect/models/devices/capability-properties/index.d.ts +135 -13
  25. package/lib/seam/connect/models/devices/capability-properties/thermostat.d.ts +135 -13
  26. package/lib/seam/connect/models/devices/capability-properties/thermostat.js +8 -1
  27. package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
  28. package/lib/seam/connect/models/devices/device-provider.d.ts +1 -1
  29. package/lib/seam/connect/models/devices/device-provider.js +1 -1
  30. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  31. package/lib/seam/connect/models/devices/device.d.ts +247 -19
  32. package/lib/seam/connect/models/devices/device.js +11 -0
  33. package/lib/seam/connect/models/devices/device.js.map +1 -1
  34. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +156 -13
  35. package/lib/seam/connect/models/events/access-grants.d.ts +1 -24
  36. package/lib/seam/connect/models/events/access-grants.js +6 -7
  37. package/lib/seam/connect/models/events/access-grants.js.map +1 -1
  38. package/lib/seam/connect/models/events/access-methods.d.ts +1 -1
  39. package/lib/seam/connect/models/events/access-methods.js +4 -4
  40. package/lib/seam/connect/models/events/access-methods.js.map +1 -1
  41. package/lib/seam/connect/models/events/devices.d.ts +6 -4
  42. package/lib/seam/connect/models/events/seam-event.d.ts +194 -3
  43. package/lib/seam/connect/models/events/seam-event.js +4 -0
  44. package/lib/seam/connect/models/events/seam-event.js.map +1 -1
  45. package/lib/seam/connect/models/instant-keys/instant-key.d.ts +2 -2
  46. package/lib/seam/connect/models/thermostats/climate-preset.d.ts +6 -0
  47. package/lib/seam/connect/models/thermostats/climate-preset.js +3 -0
  48. package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
  49. package/lib/seam/connect/models/thermostats/index.d.ts +1 -0
  50. package/lib/seam/connect/models/thermostats/index.js +1 -0
  51. package/lib/seam/connect/models/thermostats/index.js.map +1 -1
  52. package/lib/seam/connect/models/thermostats/thermostat-program.d.ts +79 -0
  53. package/lib/seam/connect/models/thermostats/thermostat-program.js +74 -0
  54. package/lib/seam/connect/models/thermostats/thermostat-program.js.map +1 -0
  55. package/lib/seam/connect/models/thermostats/thermostat-schedule.d.ts +7 -7
  56. package/lib/seam/connect/models/thermostats/thermostat-schedule.js +3 -7
  57. package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -1
  58. package/lib/seam/connect/openapi.d.ts +3396 -1577
  59. package/lib/seam/connect/openapi.js +2620 -820
  60. package/lib/seam/connect/openapi.js.map +1 -1
  61. package/lib/seam/connect/route-types.d.ts +3816 -61
  62. package/lib/seam/connect/schemas.d.ts +1 -1
  63. package/lib/seam/connect/schemas.js +1 -1
  64. package/lib/seam/connect/schemas.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/lib/seam/connect/models/access-grants/access-method.ts +11 -1
  67. package/src/lib/seam/connect/models/acs/acs-system.ts +6 -0
  68. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +6 -22
  69. package/src/lib/seam/connect/models/acs/acs-users/pending-mutations.ts +62 -27
  70. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  71. package/src/lib/seam/connect/models/action-attempts/encode-access-method.ts +69 -0
  72. package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +9 -0
  73. package/src/lib/seam/connect/models/devices/device-provider.ts +1 -1
  74. package/src/lib/seam/connect/models/devices/device.ts +14 -0
  75. package/src/lib/seam/connect/models/events/access-grants.ts +6 -7
  76. package/src/lib/seam/connect/models/events/access-methods.ts +4 -4
  77. package/src/lib/seam/connect/models/events/seam-event.ts +4 -0
  78. package/src/lib/seam/connect/models/thermostats/climate-preset.ts +5 -0
  79. package/src/lib/seam/connect/models/thermostats/index.ts +1 -0
  80. package/src/lib/seam/connect/models/thermostats/thermostat-program.ts +90 -0
  81. package/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts +3 -7
  82. package/src/lib/seam/connect/openapi.ts +3600 -1667
  83. package/src/lib/seam/connect/route-types.ts +4279 -87
  84. package/src/lib/seam/connect/schemas.ts +2 -0
@@ -1 +1 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, noise_threshold, pagination, seam_event, thermostat_schedule, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
@@ -1,2 +1,2 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, noise_threshold, pagination, seam_event, thermostat_schedule, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
2
2
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.386.0",
3
+ "version": "1.386.2",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -21,8 +21,18 @@ export const access_method = z.object({
21
21
  issued_at: z
22
22
  .string()
23
23
  .datetime()
24
- .nullable()
24
+ .optional()
25
25
  .describe('Date and time at which the access method was issued.'),
26
+ instant_key_url: z
27
+ .string()
28
+ .optional()
29
+ .describe('URL of instant key for mobile key access methods.'),
30
+ is_card_encoding_required: z
31
+ .boolean()
32
+ .optional()
33
+ .describe(
34
+ 'Whether card encoding is required for plastic card access methods.',
35
+ ),
26
36
  }).describe(`
27
37
  ---
28
38
  undocumented: Unreleased.
@@ -25,6 +25,12 @@ export const acs_system_capability_flags = z.object({
25
25
  .describe(
26
26
  'Indicates whether the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) supports [adding users to access groups](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups#add-an-acs-user-to-an-access-group). See also [Access Group-based Access Control Systems](https://docs.seam.co/latest/capability-guides/access-systems/understanding-access-control-system-differences#access-group-based-access-control-systems).',
27
27
  ),
28
+ can_update_user_schedule: z.boolean().optional(),
29
+ can_create_user: z.boolean().optional(),
30
+ can_delete_user: z.boolean().optional(),
31
+ can_update_user_information: z.boolean().optional(),
32
+ can_update_user_supension_state: z.boolean().optional(),
33
+ can_update_user_group_membership: z.boolean().optional(),
28
34
  })
29
35
 
30
36
  export const acs_location = z.object({
@@ -299,23 +299,6 @@ const common_acs_user = z
299
299
  .describe(
300
300
  'Phone number of the user identity associated with the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) in E.164 format (for example, `+15555550100`).',
301
301
  ),
302
- latest_desired_state_synced_with_provider_at: z
303
- .string()
304
- .datetime()
305
- .nullable()
306
- .optional().describe(`
307
- ---
308
- undocumented: Only used internally.
309
- ---
310
- `),
311
- is_latest_desired_state_synced_with_provider: z
312
- .boolean()
313
- .nullable()
314
- .optional().describe(`
315
- ---
316
- undocumented: Only used internally.
317
- ---
318
- `),
319
302
  warnings: z
320
303
  .array(acs_users_warnings)
321
304
  .describe(
@@ -326,11 +309,12 @@ const common_acs_user = z
326
309
  .describe(
327
310
  'Errors associated with the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management).',
328
311
  ),
329
- pending_mutations: z.array(acs_user_pending_mutations).optional().describe(`
330
- ---
331
- undocumented: Experimental.
332
- ---
333
- `),
312
+ pending_mutations: z
313
+ .array(acs_user_pending_mutations)
314
+ .optional()
315
+ .describe(
316
+ 'Pending mutations associated with the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system.',
317
+ ),
334
318
  })
335
319
  .merge(user_fields)
336
320
 
@@ -3,17 +3,28 @@ import { z } from 'zod'
3
3
  import { phone_number } from '../../phone-number.js'
4
4
 
5
5
  const common_pending_mutation = z.object({
6
- created_at: z.string().datetime(),
7
- message: z.string(),
6
+ created_at: z
7
+ .string()
8
+ .datetime()
9
+ .describe('Date and time at which the mutation was created.'),
10
+ message: z.string().describe('Detailed description of the mutation.'),
8
11
  })
9
12
 
10
- const creating = common_pending_mutation.extend({
11
- mutation_code: z.literal('creating'),
12
- })
13
+ const creating = common_pending_mutation
14
+ .extend({
15
+ mutation_code: z.literal('creating'),
16
+ })
17
+ .describe(
18
+ 'Seam is in the process of pushing a user creation to the integrated access system.',
19
+ )
13
20
 
14
- const deleting = common_pending_mutation.extend({
15
- mutation_code: z.literal('deleting'),
16
- })
21
+ const deleting = common_pending_mutation
22
+ .extend({
23
+ mutation_code: z.literal('deleting'),
24
+ })
25
+ .describe(
26
+ 'Seam is in the process of pushing a user deletion to the integrated access system.',
27
+ )
17
28
 
18
29
  const acs_user_info = z.object({
19
30
  email_address: z.string().email().nullable(),
@@ -33,27 +44,51 @@ const access_schedule = z.object({
33
44
  ends_at: z.string().datetime().nullable(),
34
45
  })
35
46
 
36
- const updating_access_schedule_mutation = common_pending_mutation.extend({
37
- mutation_code: z.literal('updating_access_schedule'),
38
- from: access_schedule,
39
- to: access_schedule,
40
- })
47
+ const updating_access_schedule_mutation = common_pending_mutation
48
+ .extend({
49
+ mutation_code: z.literal('updating_access_schedule'),
50
+ from: access_schedule,
51
+ to: access_schedule,
52
+ })
53
+ .describe(
54
+ 'Seam is in the process of pushing an access schedule update to the integrated access system.',
55
+ )
41
56
 
42
- const updating_suspension_state_mutation = common_pending_mutation.extend({
43
- mutation_code: z.literal('updating_suspension_state'),
44
- from: z.object({ is_suspended: z.boolean() }),
45
- to: z.object({ is_suspended: z.boolean() }),
46
- })
57
+ const updating_suspension_state_mutation = common_pending_mutation
58
+ .extend({
59
+ mutation_code: z.literal('updating_suspension_state'),
60
+ from: z.object({ is_suspended: z.boolean() }),
61
+ to: z.object({ is_suspended: z.boolean() }),
62
+ })
63
+ .describe(
64
+ 'Seam is in the process of pushing a suspension state update to the integrated access system.',
65
+ )
47
66
 
48
- const updating_group_membership_mutation = common_pending_mutation.extend({
49
- mutation_code: z.literal('updating_group_membership'),
50
- from: z.object({
51
- acs_access_group_id: z.string().uuid().nullable(),
52
- }),
53
- to: z.object({
54
- acs_access_group_id: z.string().uuid().nullable(),
55
- }),
56
- })
67
+ const updating_group_membership_mutation = common_pending_mutation
68
+ .extend({
69
+ mutation_code: z.literal('updating_group_membership'),
70
+ from: z
71
+ .object({
72
+ acs_access_group_id: z
73
+ .string()
74
+ .uuid()
75
+ .nullable()
76
+ .describe('Old access group ID.'),
77
+ })
78
+ .describe('Old access group membership.'),
79
+ to: z
80
+ .object({
81
+ acs_access_group_id: z
82
+ .string()
83
+ .uuid()
84
+ .nullable()
85
+ .describe('New access group ID.'),
86
+ })
87
+ .describe('New access group membership.'),
88
+ })
89
+ .describe(
90
+ 'Seam is in the process of pushing an access group membership update to the integrated access system.',
91
+ )
57
92
 
58
93
  export const acs_user_pending_mutations = z.discriminatedUnion(
59
94
  'mutation_code',
@@ -2,6 +2,7 @@ import { z } from 'zod'
2
2
 
3
3
  import { activate_climate_preset_action_attempt } from './activate-climate-preset.js'
4
4
  import { deprecated_action_attempts } from './deprecated.js'
5
+ import { encode_access_method_action_attempt } from './encode-access-method.js'
5
6
  import { encode_credential_action_attempt } from './encode-credential.js'
6
7
  import { lock_door_action_attempt } from './lock-door.js'
7
8
  import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
@@ -16,6 +17,7 @@ export const action_attempt = z.union([
16
17
  ...lock_door_action_attempt.options,
17
18
  ...unlock_door_action_attempt.options,
18
19
  ...scan_credential_action_attempt.options,
20
+ ...encode_access_method_action_attempt.options,
19
21
  ...encode_credential_action_attempt.options,
20
22
  ...reset_sandbox_workspace_action_attempt.options,
21
23
  ...set_fan_mode_action_attempt.options,
@@ -0,0 +1,69 @@
1
+ import { z } from 'zod'
2
+
3
+ import { access_method } from '../access-grants/access-method.js'
4
+ import {
5
+ common_action_attempt_errors,
6
+ common_failed_action_attempt,
7
+ common_pending_action_attempt,
8
+ common_succeeded_action_attempt,
9
+ } from './common.js'
10
+
11
+ const action_type = z
12
+ .literal('ENCODE_ACCESS_METHOD')
13
+ .describe('Type of action that the action attempt tracks.')
14
+
15
+ const no_credential_on_encoder_error = z.object({
16
+ type: z.literal('no_credential_on_encoder'),
17
+ message: z.string(),
18
+ })
19
+
20
+ const incompatible_card_format_error = z.object({
21
+ type: z.literal('incompatible_card_format'),
22
+ message: z.string(),
23
+ })
24
+
25
+ const credential_cannot_be_reissued = z.object({
26
+ type: z.literal('credential_cannot_be_reissued'),
27
+ message: z.string(),
28
+ })
29
+
30
+ const error = z.union([
31
+ ...common_action_attempt_errors,
32
+ no_credential_on_encoder_error,
33
+ incompatible_card_format_error,
34
+ credential_cannot_be_reissued,
35
+ ])
36
+
37
+ const result = access_method.describe(
38
+ 'If an encoding attempt was successful, includes the `access_method` data that was encoded onto the card.',
39
+ )
40
+
41
+ export const encode_access_method_action_attempt = z.discriminatedUnion(
42
+ 'status',
43
+ [
44
+ common_pending_action_attempt
45
+ .extend({
46
+ action_type,
47
+ })
48
+ .describe(
49
+ 'Action attempt to track encoding credential data from the physical encoder onto a card.',
50
+ ),
51
+ common_succeeded_action_attempt
52
+ .extend({
53
+ action_type,
54
+ result,
55
+ })
56
+ .describe(
57
+ 'Action attempt to indicate that encoding access method data from the physical encoder onto a card succeeded.',
58
+ ),
59
+ common_failed_action_attempt
60
+ .extend({ action_type, error })
61
+ .describe(
62
+ 'Action attempt to indicate that encoding access method data from the physical encoder onto a card failed.',
63
+ ),
64
+ ],
65
+ )
66
+
67
+ export type EncodeAccessMethodActionAttempt = z.infer<
68
+ typeof encode_access_method_action_attempt
69
+ >
@@ -5,7 +5,9 @@ import {
5
5
  climate_setting,
6
6
  fan_mode_setting,
7
7
  hvac_mode_setting,
8
+ thermostat_daily_program,
8
9
  thermostat_schedule,
10
+ thermostat_weekly_program,
9
11
  } from '../../thermostats/index.js'
10
12
 
11
13
  export const thermostat_capability_properties = z
@@ -41,6 +43,13 @@ export const thermostat_capability_properties = z
41
43
  available_climate_presets: z.array(climate_preset),
42
44
  fallback_climate_preset_key: z.string().min(1).nullable().default(null),
43
45
  active_thermostat_schedule: thermostat_schedule.nullable().default(null),
46
+ thermostat_daily_programs: z
47
+ .array(thermostat_daily_program)
48
+ .nullable()
49
+ .default(null),
50
+ thermostat_weekly_program: thermostat_weekly_program
51
+ .nullable()
52
+ .default(null),
44
53
  min_cooling_set_point_celsius: z.number(),
45
54
  min_cooling_set_point_fahrenheit: z.number(),
46
55
  max_cooling_set_point_celsius: z.number(),
@@ -107,7 +107,7 @@ export const PROVIDER_CATEGORY_MAP = {
107
107
  'tedee',
108
108
  ],
109
109
 
110
- thermostats: ['ecobee', 'nest'],
110
+ thermostats: ['ecobee', 'nest', 'sensi', 'honeywell_resideo'],
111
111
  noise_sensors: ['minut', 'noiseaware'],
112
112
  access_control_systems: [
113
113
  'pti',
@@ -306,6 +306,16 @@ const device_has_flaky_connection = common_device_warning
306
306
  })
307
307
  .describe('Device has flaky connection.')
308
308
 
309
+ const lockly_time_zone_not_configured = common_device_warning
310
+ .extend({
311
+ warning_code: z
312
+ .literal('lockly_time_zone_not_configured')
313
+ .describe(warning_code_description),
314
+ })
315
+ .describe(
316
+ 'We detected that this device does not have a time zone configured. Time bound codes may not work as expected.',
317
+ )
318
+
309
319
  export const unknown_issue_with_phone = common_device_warning
310
320
  .extend({
311
321
  warning_code: z
@@ -333,6 +343,7 @@ const device_warning = z.discriminatedUnion('warning_code', [
333
343
  salto_ks_privacy_mode,
334
344
  salto_ks_subscription_limit_almost_reached,
335
345
  unknown_issue_with_phone,
346
+ lockly_time_zone_not_configured,
336
347
  ])
337
348
 
338
349
  export type DeviceWarning = z.infer<typeof device_warning>
@@ -376,6 +387,9 @@ export const device_warning_map = z.object({
376
387
  salto_ks_subscription_limit_almost_reached:
377
388
  salto_ks_subscription_limit_almost_reached.optional().nullable(),
378
389
  unknown_issue_with_phone: unknown_issue_with_phone.optional().nullable(),
390
+ lockly_time_zone_not_configured: lockly_time_zone_not_configured
391
+ .optional()
392
+ .nullable(),
379
393
  })
380
394
 
381
395
  export type DeviceWarningMap = z.infer<typeof device_warning_map>
@@ -10,7 +10,7 @@ export const access_grant_created_event = access_grant_event.extend({
10
10
  event_type: z.literal('access_grant.created'),
11
11
  }).describe(`
12
12
  ---
13
- route_path: /access_grants
13
+ route_path: /unstable_access_grants
14
14
  ---
15
15
  An access grant was created.
16
16
  `)
@@ -21,7 +21,7 @@ export const access_grant_deleted_event = access_grant_event.extend({
21
21
  event_type: z.literal('access_grant.deleted'),
22
22
  }).describe(`
23
23
  ---
24
- route_path: /access_grants
24
+ route_path: /unstable_access_grants
25
25
  ---
26
26
  An access grant was deleted.
27
27
  `)
@@ -35,7 +35,7 @@ export const access_grant_access_granted_to_all_doors_event =
35
35
  event_type: z.literal('access_grant.access_granted_to_all_doors'),
36
36
  }).describe(`
37
37
  ---
38
- route_path: /access_grants
38
+ route_path: /unstable_access_grants
39
39
  ---
40
40
  All access requested for an access grant was successfully granted.
41
41
  `)
@@ -57,7 +57,7 @@ export const access_grant_access_granted_to_door_event =
57
57
  acs_entrance_id,
58
58
  }).describe(`
59
59
  ---
60
- route_path: /access_grants
60
+ route_path: /unstable_access_grants
61
61
  ---
62
62
  Access requested as part of an access grant to a particular door was successfully granted.
63
63
  `)
@@ -73,7 +73,7 @@ export const access_grant_access_to_door_lost_event = access_grant_event.extend(
73
73
  },
74
74
  ).describe(`
75
75
  ---
76
- route_path: /access_grants
76
+ route_path: /unstable_access_grants
77
77
  ---
78
78
  Access to a particular door that was requested as part of an access grant was lost.
79
79
  `)
@@ -82,11 +82,10 @@ export type AccessGrantAccessToDoorLostEvent = z.infer<
82
82
  typeof access_grant_access_to_door_lost_event
83
83
  >
84
84
 
85
- export const access_code_events = [
85
+ export const access_grant_events = [
86
86
  access_grant_created_event,
87
87
  access_grant_deleted_event,
88
88
  access_grant_access_granted_to_all_doors_event,
89
89
  access_grant_access_granted_to_door_event,
90
90
  access_grant_access_to_door_lost_event,
91
- access_grant_deleted_event,
92
91
  ] as const
@@ -10,7 +10,7 @@ export const access_method_issued_event = access_method_event.extend({
10
10
  event_type: z.literal('access_method.issued'),
11
11
  }).describe(`
12
12
  ---
13
- route_path: /access_methods
13
+ route_path: /unstable_access_methods
14
14
  ---
15
15
  An access method was issued.
16
16
  `)
@@ -22,7 +22,7 @@ export const access_method_card_encoding_required_event =
22
22
  event_type: z.literal('access_method.card_encoding_required'),
23
23
  }).describe(`
24
24
  ---
25
- route_path: /access_methods
25
+ route_path: /unstable_access_methods
26
26
  ---
27
27
  An access method representing a physical card requires encoding.
28
28
  `)
@@ -35,7 +35,7 @@ export const access_method_revoked_event = access_method_event.extend({
35
35
  event_type: z.literal('access_method.revoked'),
36
36
  }).describe(`
37
37
  ---
38
- route_path: /access_methods
38
+ route_path: /unstable_access_methods
39
39
  ---
40
40
  An access method was revoked.
41
41
  `)
@@ -44,7 +44,7 @@ export type AccessMethodRevokedEvent = z.infer<
44
44
  typeof access_method_revoked_event
45
45
  >
46
46
 
47
- export const access_code_events = [
47
+ export const access_method_events = [
48
48
  access_method_issued_event,
49
49
  access_method_revoked_event,
50
50
  access_method_card_encoding_required_event,
@@ -1,6 +1,8 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { access_code_events } from './access-codes.js'
4
+ import { access_grant_events } from './access-grants.js'
5
+ import { access_method_events } from './access-methods.js'
4
6
  import { acs_events } from './acs/index.js'
5
7
  import { action_attempt_events } from './action-attempts.js'
6
8
  import { client_session_events } from './client-sessions.js'
@@ -12,6 +14,8 @@ import { phone_events } from './phones.js'
12
14
 
13
15
  export const seam_event = z.discriminatedUnion('event_type', [
14
16
  ...access_code_events,
17
+ ...access_grant_events,
18
+ ...access_method_events,
15
19
  ...acs_events,
16
20
  ...client_session_events,
17
21
  ...connected_account_events,
@@ -18,6 +18,11 @@ export const climate_preset = z.object({
18
18
  .describe(
19
19
  'Indicates whether the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted.',
20
20
  ),
21
+ can_program: z
22
+ .boolean()
23
+ .describe(
24
+ 'Indicates whether the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program.',
25
+ ),
21
26
  name: z
22
27
  .string()
23
28
  .nullable()
@@ -1,3 +1,4 @@
1
1
  export * from './climate-preset.js'
2
2
  export * from './modes.js'
3
+ export * from './thermostat-program.js'
3
4
  export * from './thermostat-schedule.js'
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod'
2
+
3
+ export const thermostat_daily_program_period = z.object({
4
+ starts_at_time: z
5
+ .string()
6
+ .regex(/^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/)
7
+ .describe(
8
+ 'Time at which the thermostat daily program entry starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
9
+ ),
10
+ climate_preset_key: z
11
+ .string()
12
+ .describe(
13
+ 'Key of the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the starts_at_time.',
14
+ ),
15
+ })
16
+
17
+ export const thermostat_daily_program = z.object({
18
+ thermostat_daily_program_id: z
19
+ .string()
20
+ .uuid()
21
+ .describe('ID of the thermostat daily program.'),
22
+ device_id: z.string().uuid().describe('ID of the desired thermostat device.'),
23
+ name: z
24
+ .string()
25
+ .optional()
26
+ .describe('User-friendly name to identify the thermostat daily program.'),
27
+ periods: z
28
+ .array(thermostat_daily_program_period)
29
+ .describe('Array of thermostat daily program periods.'),
30
+ created_at: z
31
+ .string()
32
+ .datetime()
33
+ .describe(
34
+ 'Date and time at which the thermostat daily program was created.',
35
+ ),
36
+ })
37
+
38
+ export const thermostat_weekly_program = z.object({
39
+ device_id: z
40
+ .string()
41
+ .uuid()
42
+ .describe('ID of the thermostat device the weekly program is for.'),
43
+ monday_program_id: z
44
+ .string()
45
+ .uuid()
46
+ .nullable()
47
+ .describe('ID of the thermostat daily program to run on Mondays.'),
48
+ tuesday_program_id: z
49
+ .string()
50
+ .uuid()
51
+ .nullable()
52
+ .describe('ID of the thermostat daily program to run on Tuesdays.'),
53
+ wednesday_program_id: z
54
+ .string()
55
+ .uuid()
56
+ .nullable()
57
+ .describe('ID of the thermostat daily program to run on Wednesdays.'),
58
+ thursday_program_id: z
59
+ .string()
60
+ .uuid()
61
+ .nullable()
62
+ .describe('ID of the thermostat daily program to run on Thursdays.'),
63
+ friday_program_id: z
64
+ .string()
65
+ .uuid()
66
+ .nullable()
67
+ .describe('ID of the thermostat daily program to run on Fridays.'),
68
+ saturday_program_id: z
69
+ .string()
70
+ .uuid()
71
+ .nullable()
72
+ .describe('ID of the thermostat daily program to run on Saturdays.'),
73
+ sunday_program_id: z
74
+ .string()
75
+ .uuid()
76
+ .nullable()
77
+ .describe('ID of the thermostat daily program to run on Sundays.'),
78
+ created_at: z
79
+ .string()
80
+ .datetime()
81
+ .describe(
82
+ 'Date and time at which the thermostat weekly program was created.',
83
+ ),
84
+ })
85
+
86
+ export type ThermostatDailyProgram = z.infer<typeof thermostat_daily_program>
87
+ export type ThermostatDailyProgramPeriod = z.infer<
88
+ typeof thermostat_daily_program_period
89
+ >
90
+ export type ThermostatWeeklyProgram = z.infer<typeof thermostat_weekly_program>
@@ -27,7 +27,7 @@ export const thermostat_schedule = z.object({
27
27
  max_override_period_minutes: z
28
28
  .number()
29
29
  .int()
30
- .nonnegative()
30
+ .positive()
31
31
  .nullable()
32
32
  .optional()
33
33
  .describe(
@@ -39,15 +39,11 @@ export const thermostat_schedule = z.object({
39
39
  .describe(
40
40
  'Date and time at which the [thermostat schedule](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
41
41
  ),
42
- unstable_is_override_allowed: z
42
+ is_override_allowed: z
43
43
  .boolean()
44
44
  .optional()
45
45
  .describe(
46
- `
47
- ---
48
- undocumented: Unstable
49
- ---
50
- Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts.`,
46
+ "Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts.",
51
47
  ),
52
48
  ends_at: z
53
49
  .string()