@seamapi/types 1.723.0 → 1.725.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 (127) hide show
  1. package/dist/connect.cjs +8098 -2279
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +21305 -5507
  4. package/dist/index.cjs +8098 -2279
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +205 -142
  7. package/lib/seam/connect/models/access-codes/managed-access-code.js +57 -22
  8. package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
  9. package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +95 -52
  10. package/lib/seam/connect/models/access-codes/unmanaged-access-code.js +5 -2
  11. package/lib/seam/connect/models/access-codes/unmanaged-access-code.js.map +1 -1
  12. package/lib/seam/connect/models/access-grants/access-grant.d.ts +721 -12
  13. package/lib/seam/connect/models/access-grants/access-grant.js +75 -1
  14. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
  15. package/lib/seam/connect/models/access-grants/access-method.d.ts +825 -8
  16. package/lib/seam/connect/models/access-grants/access-method.js +123 -1
  17. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  18. package/lib/seam/connect/models/access-grants/index.d.ts +1 -0
  19. package/lib/seam/connect/models/access-grants/index.js +1 -0
  20. package/lib/seam/connect/models/access-grants/index.js.map +1 -1
  21. package/lib/seam/connect/models/access-grants/pending-mutations.d.ts +255 -0
  22. package/lib/seam/connect/models/access-grants/pending-mutations.js +78 -0
  23. package/lib/seam/connect/models/access-grants/pending-mutations.js.map +1 -0
  24. package/lib/seam/connect/models/access-grants/requested-access-method.d.ts +3 -0
  25. package/lib/seam/connect/models/access-grants/requested-access-method.js +6 -0
  26. package/lib/seam/connect/models/access-grants/requested-access-method.js.map +1 -1
  27. package/lib/seam/connect/models/acs/acs-entrance.d.ts +0 -5
  28. package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +80 -80
  29. package/lib/seam/connect/models/acs/metadata/salto-space.d.ts +0 -3
  30. package/lib/seam/connect/models/acs/metadata/salto-space.js +0 -5
  31. package/lib/seam/connect/models/acs/metadata/salto-space.js.map +1 -1
  32. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +36 -16
  33. package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +5 -5
  34. package/lib/seam/connect/models/action-attempts/encode-credential.js +5 -5
  35. package/lib/seam/connect/models/action-attempts/encode-credential.js.map +1 -1
  36. package/lib/seam/connect/models/action-attempts/lock-door.d.ts +13 -3
  37. package/lib/seam/connect/models/action-attempts/lock-door.js +8 -1
  38. package/lib/seam/connect/models/action-attempts/lock-door.js.map +1 -1
  39. package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +5 -5
  40. package/lib/seam/connect/models/action-attempts/scan-credential.js +5 -5
  41. package/lib/seam/connect/models/action-attempts/scan-credential.js.map +1 -1
  42. package/lib/seam/connect/models/action-attempts/unlock-door.d.ts +13 -3
  43. package/lib/seam/connect/models/action-attempts/unlock-door.js +8 -1
  44. package/lib/seam/connect/models/action-attempts/unlock-door.js.map +1 -1
  45. package/lib/seam/connect/models/batch.d.ts +3952 -752
  46. package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +58 -0
  47. package/lib/seam/connect/models/connected-accounts/connected-account.js +7 -0
  48. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  49. package/lib/seam/connect/models/customer/access-grant-resources.d.ts +6 -0
  50. package/lib/seam/connect/models/customer/access-grant-resources.js +4 -0
  51. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
  52. package/lib/seam/connect/models/customer/customer-data.d.ts +5 -0
  53. package/lib/seam/connect/models/customer/customer-portal.d.ts +169 -10
  54. package/lib/seam/connect/models/customer/customer-portal.js +46 -4
  55. package/lib/seam/connect/models/customer/customer-portal.js.map +1 -1
  56. package/lib/seam/connect/models/devices/device-metadata.d.ts +45 -38
  57. package/lib/seam/connect/models/devices/device-metadata.js +26 -9
  58. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  59. package/lib/seam/connect/models/devices/device-provider.d.ts +2 -5
  60. package/lib/seam/connect/models/devices/device-provider.js +2 -3
  61. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  62. package/lib/seam/connect/models/devices/device-type.d.ts +0 -2
  63. package/lib/seam/connect/models/devices/device-type.js +0 -2
  64. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  65. package/lib/seam/connect/models/devices/device.d.ts +203 -52
  66. package/lib/seam/connect/models/devices/device.js +31 -0
  67. package/lib/seam/connect/models/devices/device.js.map +1 -1
  68. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +97 -38
  69. package/lib/seam/connect/models/events/access-codes.d.ts +1390 -0
  70. package/lib/seam/connect/models/events/access-codes.js +41 -11
  71. package/lib/seam/connect/models/events/access-codes.js.map +1 -1
  72. package/lib/seam/connect/models/events/access-methods.d.ts +60 -0
  73. package/lib/seam/connect/models/events/access-methods.js +9 -0
  74. package/lib/seam/connect/models/events/access-methods.js.map +1 -1
  75. package/lib/seam/connect/models/events/acs/index.d.ts +93 -0
  76. package/lib/seam/connect/models/events/acs/systems.d.ts +186 -0
  77. package/lib/seam/connect/models/events/acs/systems.js +19 -2
  78. package/lib/seam/connect/models/events/acs/systems.js.map +1 -1
  79. package/lib/seam/connect/models/events/action-attempts.d.ts +332 -0
  80. package/lib/seam/connect/models/events/action-attempts.js +46 -0
  81. package/lib/seam/connect/models/events/action-attempts.js.map +1 -1
  82. package/lib/seam/connect/models/events/common.d.ts +26 -0
  83. package/lib/seam/connect/models/events/common.js +22 -0
  84. package/lib/seam/connect/models/events/common.js.map +1 -1
  85. package/lib/seam/connect/models/events/connected-accounts.d.ts +140 -272
  86. package/lib/seam/connect/models/events/connected-accounts.js +17 -9
  87. package/lib/seam/connect/models/events/connected-accounts.js.map +1 -1
  88. package/lib/seam/connect/models/events/devices.d.ts +1128 -0
  89. package/lib/seam/connect/models/events/devices.js +39 -11
  90. package/lib/seam/connect/models/events/devices.js.map +1 -1
  91. package/lib/seam/connect/models/events/seam-event.d.ts +1675 -196
  92. package/lib/seam/connect/models/events/spaces.d.ts +12 -12
  93. package/lib/seam/connect/models/phones/phone-session.d.ts +0 -20
  94. package/lib/seam/connect/openapi.d.ts +6484 -2215
  95. package/lib/seam/connect/openapi.js +8922 -3442
  96. package/lib/seam/connect/openapi.js.map +1 -1
  97. package/lib/seam/connect/route-types.d.ts +7211 -1139
  98. package/package.json +1 -1
  99. package/src/lib/seam/connect/internal/model-types.ts +1 -0
  100. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +76 -24
  101. package/src/lib/seam/connect/models/access-codes/unmanaged-access-code.ts +10 -2
  102. package/src/lib/seam/connect/models/access-grants/access-grant.ts +92 -1
  103. package/src/lib/seam/connect/models/access-grants/access-method.ts +162 -1
  104. package/src/lib/seam/connect/models/access-grants/index.ts +1 -0
  105. package/src/lib/seam/connect/models/access-grants/pending-mutations.ts +101 -0
  106. package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +8 -0
  107. package/src/lib/seam/connect/models/acs/metadata/salto-space.ts +0 -5
  108. package/src/lib/seam/connect/models/action-attempts/encode-credential.ts +5 -5
  109. package/src/lib/seam/connect/models/action-attempts/lock-door.ts +10 -1
  110. package/src/lib/seam/connect/models/action-attempts/scan-credential.ts +5 -5
  111. package/src/lib/seam/connect/models/action-attempts/unlock-door.ts +10 -1
  112. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +10 -0
  113. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +7 -0
  114. package/src/lib/seam/connect/models/customer/customer-portal.ts +66 -6
  115. package/src/lib/seam/connect/models/devices/device-metadata.ts +36 -10
  116. package/src/lib/seam/connect/models/devices/device-provider.ts +2 -3
  117. package/src/lib/seam/connect/models/devices/device-type.ts +0 -2
  118. package/src/lib/seam/connect/models/devices/device.ts +37 -0
  119. package/src/lib/seam/connect/models/events/access-codes.ts +49 -16
  120. package/src/lib/seam/connect/models/events/access-methods.ts +14 -0
  121. package/src/lib/seam/connect/models/events/acs/systems.ts +21 -3
  122. package/src/lib/seam/connect/models/events/action-attempts.ts +64 -0
  123. package/src/lib/seam/connect/models/events/common.ts +31 -0
  124. package/src/lib/seam/connect/models/events/connected-accounts.ts +23 -11
  125. package/src/lib/seam/connect/models/events/devices.ts +51 -18
  126. package/src/lib/seam/connect/openapi.ts +8974 -2885
  127. package/src/lib/seam/connect/route-types.ts +8121 -1686
@@ -9,6 +9,20 @@ const action_attempt_event = common_event.extend({
9
9
  .describe('ID of the affected action attempt.'),
10
10
  action_type: z.string().describe('Type of the action.'),
11
11
  status: z.string().describe('Status of the action.'),
12
+ device_id: z
13
+ .string()
14
+ .uuid()
15
+ .optional()
16
+ .describe(
17
+ 'ID of the device associated with the action attempt, if applicable.',
18
+ ),
19
+ connected_account_id: z
20
+ .string()
21
+ .uuid()
22
+ .optional()
23
+ .describe(
24
+ 'ID of the connected account associated with the action attempt, if applicable.',
25
+ ),
12
26
  })
13
27
 
14
28
  export const action_attempt_lock_door_succeeded_event =
@@ -51,9 +65,59 @@ export const action_attempt_unlock_door_failed_event =
51
65
  An unlock door [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) failed.
52
66
  `)
53
67
 
68
+ export const action_attempt_simulate_keypad_code_entry_succeeded_event =
69
+ action_attempt_event.extend({
70
+ event_type: z.literal(
71
+ 'action_attempt.simulate_keypad_code_entry.succeeded',
72
+ ),
73
+ }).describe(`
74
+ ---
75
+ route_path: /action_attempts
76
+ ---
77
+ A simulate keypad code entry [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) succeeded.
78
+ `)
79
+
80
+ export const action_attempt_simulate_keypad_code_entry_failed_event =
81
+ action_attempt_event.extend({
82
+ event_type: z.literal('action_attempt.simulate_keypad_code_entry.failed'),
83
+ }).describe(`
84
+ ---
85
+ route_path: /action_attempts
86
+ ---
87
+ A simulate keypad code entry [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) failed.
88
+ `)
89
+
90
+ export const action_attempt_simulate_manual_lock_via_keypad_succeeded_event =
91
+ action_attempt_event.extend({
92
+ event_type: z.literal(
93
+ 'action_attempt.simulate_manual_lock_via_keypad.succeeded',
94
+ ),
95
+ }).describe(`
96
+ ---
97
+ route_path: /action_attempts
98
+ ---
99
+ A simulate manual lock via keypad [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) succeeded.
100
+ `)
101
+
102
+ export const action_attempt_simulate_manual_lock_via_keypad_failed_event =
103
+ action_attempt_event.extend({
104
+ event_type: z.literal(
105
+ 'action_attempt.simulate_manual_lock_via_keypad.failed',
106
+ ),
107
+ }).describe(`
108
+ ---
109
+ route_path: /action_attempts
110
+ ---
111
+ A simulate manual lock via keypad [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) failed.
112
+ `)
113
+
54
114
  export const action_attempt_events = [
55
115
  action_attempt_lock_door_succeeded_event,
56
116
  action_attempt_lock_door_failed_event,
57
117
  action_attempt_unlock_door_succeeded_event,
58
118
  action_attempt_unlock_door_failed_event,
119
+ action_attempt_simulate_keypad_code_entry_succeeded_event,
120
+ action_attempt_simulate_keypad_code_entry_failed_event,
121
+ action_attempt_simulate_manual_lock_via_keypad_succeeded_event,
122
+ action_attempt_simulate_manual_lock_via_keypad_failed_event,
59
123
  ]
@@ -17,3 +17,34 @@ export const common_event = z.object({
17
17
  .datetime()
18
18
  .describe('Date and time at which the event occurred.'),
19
19
  })
20
+
21
+ const error_code_description =
22
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
23
+ const warning_code_description =
24
+ 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'
25
+
26
+ export const common_event_error = z.object({
27
+ created_at: z
28
+ .string()
29
+ .datetime()
30
+ .describe('Date and time at which Seam created the error.'),
31
+ message: z
32
+ .string()
33
+ .describe(
34
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
35
+ ),
36
+ error_code: z.string().describe(error_code_description),
37
+ })
38
+
39
+ export const common_event_warning = z.object({
40
+ created_at: z
41
+ .string()
42
+ .datetime()
43
+ .describe('Date and time at which Seam created the warning.'),
44
+ message: z
45
+ .string()
46
+ .describe(
47
+ 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
48
+ ),
49
+ warning_code: z.string().describe(warning_code_description),
50
+ })
@@ -1,8 +1,11 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { connected_account_error } from '../connected-accounts/index.js'
4
3
  import { custom_metadata } from '../custom-metadata.js'
5
- import { common_event } from './common.js'
4
+ import {
5
+ common_event,
6
+ common_event_error,
7
+ common_event_warning,
8
+ } from './common.js'
6
9
 
7
10
  const connected_account_event = common_event.extend({
8
11
  connected_account_id: z
@@ -25,6 +28,15 @@ const connect_webview_id = z
25
28
  'ID of the [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews) associated with the event.',
26
29
  )
27
30
 
31
+ const connected_account_event_issue_properties = {
32
+ connected_account_errors: z
33
+ .array(common_event_error)
34
+ .describe('Errors associated with the connected account.'),
35
+ connected_account_warnings: z
36
+ .array(common_event_warning)
37
+ .describe('Warnings associated with the connected account.'),
38
+ }
39
+
28
40
  export const connected_account_connected_event = connected_account_event.extend(
29
41
  {
30
42
  event_type: z.literal('connected_account.connected'),
@@ -78,13 +90,11 @@ export type ConnectedAccountSuccessfulLoginEvent = z.infer<
78
90
  typeof connected_account_successful_login_event
79
91
  >
80
92
 
81
- export const connected_account_disconnected_event =
82
- connected_account_event.extend({
93
+ export const connected_account_disconnected_event = connected_account_event
94
+ .extend({
83
95
  event_type: z.literal('connected_account.disconnected'),
84
- connected_account_errors: z
85
- .array(connected_account_error)
86
- .describe('Errors associated with the connected account.'),
87
- }).describe(`
96
+ })
97
+ .extend(connected_account_event_issue_properties).describe(`
88
98
  ---
89
99
  route_path: /connected_accounts
90
100
  ---
@@ -149,9 +159,11 @@ export type ConnectedAccountCompletedFirstSyncAfterReconnectionEvent = z.infer<
149
159
  >
150
160
 
151
161
  export const connected_account_reauthorization_requested_event =
152
- connected_account_event.extend({
153
- event_type: z.literal('connected_account.reauthorization_requested'),
154
- }).describe(`
162
+ connected_account_event
163
+ .extend({
164
+ event_type: z.literal('connected_account.reauthorization_requested'),
165
+ })
166
+ .extend(connected_account_event_issue_properties).describe(`
155
167
  ---
156
168
  route_path: /connected_accounts
157
169
  ---
@@ -2,7 +2,11 @@ import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
4
  import { climate_setting } from '../thermostats/climate-preset.js'
5
- import { common_event } from './common.js'
5
+ import {
6
+ common_event,
7
+ common_event_error,
8
+ common_event_warning,
9
+ } from './common.js'
6
10
 
7
11
  const device_event = common_event.extend({
8
12
  device_id: z.string().uuid().describe('ID of the affected device.'),
@@ -12,6 +16,10 @@ const device_event = common_event.extend({
12
16
  .describe(
13
17
  'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.',
14
18
  ),
19
+ customer_key: z
20
+ .string()
21
+ .optional()
22
+ .describe('The customer key associated with the device, if any.'),
15
23
  device_custom_metadata: custom_metadata
16
24
  .optional()
17
25
  .describe(
@@ -42,6 +50,21 @@ const disconnection_error_code = z
42
50
  .enum(['account_disconnected', 'hub_disconnected', 'device_disconnected'])
43
51
  .describe('Error code associated with the disconnection event, if any.')
44
52
 
53
+ const device_event_issue_properties = {
54
+ connected_account_errors: z
55
+ .array(common_event_error)
56
+ .describe('Errors associated with the connected account.'),
57
+ connected_account_warnings: z
58
+ .array(common_event_warning)
59
+ .describe('Warnings associated with the connected account.'),
60
+ device_errors: z
61
+ .array(common_event_error)
62
+ .describe('Errors associated with the device.'),
63
+ device_warnings: z
64
+ .array(common_event_warning)
65
+ .describe('Warnings associated with the device.'),
66
+ }
67
+
45
68
  export const lock_method = z
46
69
  .enum(['keycode', 'manual', 'automatic', 'unknown', 'seamapi'])
47
70
  .describe(
@@ -110,10 +133,12 @@ export type UnmanagedDeviceConnectedEvent = z.infer<
110
133
  typeof unmanaged_device_connected_event
111
134
  >
112
135
 
113
- export const device_disconnected_event = device_event.extend({
114
- event_type: z.literal('device.disconnected'),
115
- error_code: disconnection_error_code,
116
- }).describe(`
136
+ export const device_disconnected_event = device_event
137
+ .extend({
138
+ event_type: z.literal('device.disconnected'),
139
+ error_code: disconnection_error_code,
140
+ })
141
+ .extend(device_event_issue_properties).describe(`
117
142
  ---
118
143
  route_path: /devices
119
144
  ---
@@ -122,10 +147,12 @@ export const device_disconnected_event = device_event.extend({
122
147
 
123
148
  export type DeviceDisconnectedEvent = z.infer<typeof device_disconnected_event>
124
149
 
125
- export const unmanaged_device_disconnected_event = device_event.extend({
126
- event_type: z.literal('device.unmanaged.disconnected'),
127
- error_code: disconnection_error_code,
128
- }).describe(`
150
+ export const unmanaged_device_disconnected_event = device_event
151
+ .extend({
152
+ event_type: z.literal('device.unmanaged.disconnected'),
153
+ error_code: disconnection_error_code,
154
+ })
155
+ .extend(device_event_issue_properties).describe(`
129
156
  ---
130
157
  route_path: /devices/unmanaged
131
158
  ---
@@ -250,9 +277,11 @@ export type DeviceSaltoPrivacyModeDeactivatedEvent = z.infer<
250
277
  typeof device_salto_privacy_mode_deactivated_event
251
278
  >
252
279
 
253
- export const device_connection_became_flaky_event = device_event.extend({
254
- event_type: z.literal('device.connection_became_flaky'),
255
- }).describe(`
280
+ export const device_connection_became_flaky_event = device_event
281
+ .extend({
282
+ event_type: z.literal('device.connection_became_flaky'),
283
+ })
284
+ .extend(device_event_issue_properties).describe(`
256
285
  ---
257
286
  route_path: /devices
258
287
  ---
@@ -276,9 +305,11 @@ export type DeviceConnectionStabilizedEvent = z.infer<
276
305
  typeof device_connection_stabilized_event
277
306
  >
278
307
 
279
- export const device_error_subscription_required_event = device_event.extend({
280
- event_type: z.literal('device.error.subscription_required'),
281
- }).describe(`
308
+ export const device_error_subscription_required_event = device_event
309
+ .extend({
310
+ event_type: z.literal('device.error.subscription_required'),
311
+ })
312
+ .extend(device_event_issue_properties).describe(`
282
313
  ---
283
314
  route_path: /devices
284
315
  ---
@@ -316,9 +347,11 @@ export type DeviceAccessoryKeypadConnectedEvent = z.infer<
316
347
  typeof device_accessory_keypad_connected_event
317
348
  >
318
349
 
319
- export const device_accessory_keypad_disconnected_event = device_event.extend({
320
- event_type: z.literal('device.accessory_keypad_disconnected'),
321
- }).describe(`
350
+ export const device_accessory_keypad_disconnected_event = device_event
351
+ .extend({
352
+ event_type: z.literal('device.accessory_keypad_disconnected'),
353
+ })
354
+ .extend(device_event_issue_properties).describe(`
322
355
  ---
323
356
  route_path: /devices
324
357
  ---