@seamapi/types 1.918.0 → 1.919.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 (29) hide show
  1. package/dist/connect.cjs +450 -184
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/index.cjs +450 -184
  4. package/dist/index.cjs.map +1 -1
  5. package/lib/seam/connect/models/access-codes/managed-access-code.js +78 -44
  6. package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
  7. package/lib/seam/connect/models/acs/acs-access-group.js +7 -4
  8. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  9. package/lib/seam/connect/models/acs/acs-encoder.js +7 -3
  10. package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
  11. package/lib/seam/connect/models/acs/acs-system.js +58 -31
  12. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  13. package/lib/seam/connect/models/acs/acs-users/acs-user.js +42 -24
  14. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
  15. package/lib/seam/connect/models/connected-accounts/connected-account.js +29 -19
  16. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  17. package/lib/seam/connect/models/devices/device.js +51 -27
  18. package/lib/seam/connect/models/devices/device.js.map +1 -1
  19. package/lib/seam/connect/openapi.js +118 -3
  20. package/lib/seam/connect/openapi.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +136 -114
  23. package/src/lib/seam/connect/models/acs/acs-access-group.ts +10 -9
  24. package/src/lib/seam/connect/models/acs/acs-encoder.ts +7 -5
  25. package/src/lib/seam/connect/models/acs/acs-system.ts +73 -56
  26. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +48 -40
  27. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +78 -73
  28. package/src/lib/seam/connect/models/devices/device.ts +70 -46
  29. package/src/lib/seam/connect/openapi.ts +118 -3
@@ -45,86 +45,91 @@ const common_connected_account_warning = z.object({
45
45
  ),
46
46
  })
47
47
 
48
- export const account_disconnected = common_connected_account_error
49
- .extend({
50
- error_code: z
51
- .literal('account_disconnected')
52
- .describe(error_code_description),
53
- })
54
- .describe('Indicates that the account is disconnected.')
48
+ export const account_disconnected = common_connected_account_error.extend({
49
+ error_code: z
50
+ .literal('account_disconnected')
51
+ .describe(error_code_description),
52
+ }).describe(`
53
+ ---
54
+ resource_type: connected_account
55
+ ---
56
+ Indicates that the account is disconnected.
57
+ `)
55
58
 
56
- export const bridge_disconnected = common_connected_account_error
57
- .extend({
58
- error_code: z
59
- .literal('bridge_disconnected')
60
- .describe(error_code_description),
61
- })
62
- .describe(
63
- 'Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system.errors.seam_bridge_disconnected).',
64
- )
59
+ export const bridge_disconnected = common_connected_account_error.extend({
60
+ error_code: z.literal('bridge_disconnected').describe(error_code_description),
61
+ }).describe(`
62
+ ---
63
+ resource_type: connected_account
64
+ ---
65
+ Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system.errors.seam_bridge_disconnected).
66
+ `)
65
67
 
66
68
  export const salto_ks_subscription_limit_exceeded =
67
- common_connected_account_error
68
- .extend({
69
- error_code: z
70
- .literal('salto_ks_subscription_limit_exceeded')
71
- .describe(error_code_description),
72
- salto_ks_metadata: z
73
- .object({
74
- sites: z
75
- .array(
76
- z
77
- .object({
78
- site_id: z
79
- .string()
80
- .describe(
81
- 'ID of a Salto site associated with the connected account that has an error.',
82
- ),
83
- site_name: z
84
- .string()
85
- .describe(
86
- 'Name of a Salto site associated with the connected account that has an error.',
87
- ),
88
- subscribed_site_user_count: z
89
- .number()
90
- .int()
91
- .min(0)
92
- .describe(
93
- 'Count of subscribed site users for a Salto site associated with the connected account that has an error.',
94
- ),
95
- site_user_subscription_limit: z
96
- .number()
97
- .int()
98
- .min(0)
99
- .describe(
100
- 'Subscription limit of site users for a Salto site associated with the connected account that has an error.',
101
- ),
102
- })
103
- .describe(
104
- 'Salto site associated with the connected account that has an error.',
105
- ),
106
- )
107
- .describe(
108
- 'Salto sites associated with the connected account that has an error.',
109
- ),
110
- })
111
- .describe(
112
- 'Salto KS metadata associated with the connected account that has an error.',
113
- ),
114
- })
115
- .describe(
116
- '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.',
117
- )
69
+ common_connected_account_error.extend({
70
+ error_code: z
71
+ .literal('salto_ks_subscription_limit_exceeded')
72
+ .describe(error_code_description),
73
+ salto_ks_metadata: z
74
+ .object({
75
+ sites: z
76
+ .array(
77
+ z
78
+ .object({
79
+ site_id: z
80
+ .string()
81
+ .describe(
82
+ 'ID of a Salto site associated with the connected account that has an error.',
83
+ ),
84
+ site_name: z
85
+ .string()
86
+ .describe(
87
+ 'Name of a Salto site associated with the connected account that has an error.',
88
+ ),
89
+ subscribed_site_user_count: z
90
+ .number()
91
+ .int()
92
+ .min(0)
93
+ .describe(
94
+ 'Count of subscribed site users for a Salto site associated with the connected account that has an error.',
95
+ ),
96
+ site_user_subscription_limit: z
97
+ .number()
98
+ .int()
99
+ .min(0)
100
+ .describe(
101
+ 'Subscription limit of site users for a Salto site associated with the connected account that has an error.',
102
+ ),
103
+ })
104
+ .describe(
105
+ 'Salto site associated with the connected account that has an error.',
106
+ ),
107
+ )
108
+ .describe(
109
+ 'Salto sites associated with the connected account that has an error.',
110
+ ),
111
+ })
112
+ .describe(
113
+ 'Salto KS metadata associated with the connected account that has an error.',
114
+ ),
115
+ }).describe(`
116
+ ---
117
+ resource_type: connected_account
118
+ ---
119
+ 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.
120
+ `)
118
121
 
119
- export const dormakaba_sites_disconnected = common_connected_account_error
120
- .extend({
122
+ export const dormakaba_sites_disconnected =
123
+ common_connected_account_error.extend({
121
124
  error_code: z
122
125
  .literal('dormakaba_sites_disconnected')
123
126
  .describe(error_code_description),
124
- })
125
- .describe(
126
- 'Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.',
127
- )
127
+ }).describe(`
128
+ ---
129
+ resource_type: connected_account
130
+ ---
131
+ Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.
132
+ `)
128
133
 
129
134
  export const connected_account_error = z.discriminatedUnion('error_code', [
130
135
  account_disconnected,
@@ -134,47 +134,58 @@ const device_offline = common_device_error
134
134
  .describe(
135
135
  `
136
136
  ---
137
+ resource_type: device
137
138
  deprecated: Use \`device_disconnected\` instead.
138
139
  ---
139
140
  Indicates that the device is offline.
140
141
  `,
141
142
  )
142
143
 
143
- const device_removed = common_device_error
144
- .extend({
145
- error_code: z.literal('device_removed').describe(error_code_description),
146
- })
147
- .describe('Indicates that the device has been removed.')
144
+ const device_removed = common_device_error.extend({
145
+ error_code: z.literal('device_removed').describe(error_code_description),
146
+ }).describe(`
147
+ ---
148
+ resource_type: device
149
+ ---
150
+ Indicates that the device has been removed.
151
+ `)
148
152
 
149
- const hub_disconnected = common_device_error
150
- .extend({
151
- error_code: z.literal('hub_disconnected').describe(error_code_description),
152
- })
153
- .describe('Indicates that the hub is disconnected.')
153
+ const hub_disconnected = common_device_error.extend({
154
+ error_code: z.literal('hub_disconnected').describe(error_code_description),
155
+ }).describe(`
156
+ ---
157
+ resource_type: device
158
+ ---
159
+ Indicates that the hub is disconnected.
160
+ `)
154
161
 
155
- const device_disconnected = common_device_error
156
- .extend({
157
- error_code: z
158
- .literal('device_disconnected')
159
- .describe(error_code_description),
160
- })
161
- .describe('Indicates that the device is disconnected.')
162
+ const device_disconnected = common_device_error.extend({
163
+ error_code: z.literal('device_disconnected').describe(error_code_description),
164
+ }).describe(`
165
+ ---
166
+ resource_type: device
167
+ ---
168
+ Indicates that the device is disconnected.
169
+ `)
162
170
 
163
- const account_disconnected = common_device_error
164
- .extend({
165
- error_code: z
166
- .literal('account_disconnected')
167
- .describe(error_code_description),
168
- is_connected_account_error: z
169
- .literal(true)
170
- .describe(
171
- 'Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.',
172
- ),
173
- is_device_error: z
174
- .literal(false)
175
- .describe('Indicates that the error is not a device error.'),
176
- })
177
- .describe('Indicates that the account is disconnected.')
171
+ const account_disconnected = common_device_error.extend({
172
+ error_code: z
173
+ .literal('account_disconnected')
174
+ .describe(error_code_description),
175
+ is_connected_account_error: z
176
+ .literal(true)
177
+ .describe(
178
+ 'Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.',
179
+ ),
180
+ is_device_error: z
181
+ .literal(false)
182
+ .describe('Indicates that the error is not a device error.'),
183
+ }).describe(`
184
+ ---
185
+ resource_type: connected_account
186
+ ---
187
+ Indicates that the account is disconnected.
188
+ `)
178
189
 
179
190
  const empty_backup_access_code_pool = common_device_error.extend({
180
191
  error_code: z
@@ -182,6 +193,7 @@ const empty_backup_access_code_pool = common_device_error.extend({
182
193
  .describe(error_code_description),
183
194
  }).describe(`
184
195
  ---
196
+ resource_type: device
185
197
  variant_group_key: access_codes
186
198
  ---
187
199
  Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty.
@@ -193,6 +205,7 @@ const august_lock_not_authorized = common_device_error.extend({
193
205
  .describe(error_code_description),
194
206
  }).describe(`
195
207
  ---
208
+ resource_type: device
196
209
  variant_group_key: locks
197
210
  ---
198
211
  Indicates that the user is not authorized to use the August lock.
@@ -204,6 +217,7 @@ const august_lock_missing_bridge = common_device_error.extend({
204
217
  .describe(error_code_description),
205
218
  }).describe(`
206
219
  ---
220
+ resource_type: device
207
221
  deprecated: Use \`hub_disconnected\` instead.
208
222
  variant_group_key: locks
209
223
  ---
@@ -224,6 +238,7 @@ const salto_ks_subscription_limit_exceeded = common_device_error.extend({
224
238
  .describe('Indicates that the error is not a device error.'),
225
239
  }).describe(`
226
240
  ---
241
+ resource_type: connected_account
227
242
  variant_group_key: locks
228
243
  ---
229
244
  Indicates that the Salto site user limit has been reached.
@@ -235,18 +250,22 @@ const ttlock_lock_not_paired_to_gateway = common_device_error.extend({
235
250
  .describe(error_code_description),
236
251
  }).describe(`
237
252
  ---
253
+ resource_type: device
238
254
  deprecated: Use \`hub_disconnected\` instead.
239
255
  ---
240
256
  Indicates that the lock is not paired with a gateway.
241
257
  `)
242
258
 
243
- const missing_device_credentials = common_device_error
244
- .extend({
245
- error_code: z
246
- .literal('missing_device_credentials')
247
- .describe(error_code_description),
248
- })
249
- .describe('Indicates that device credentials are missing.')
259
+ const missing_device_credentials = common_device_error.extend({
260
+ error_code: z
261
+ .literal('missing_device_credentials')
262
+ .describe(error_code_description),
263
+ }).describe(`
264
+ ---
265
+ resource_type: device
266
+ ---
267
+ Indicates that device credentials are missing.
268
+ `)
250
269
 
251
270
  const auxiliary_heat_running = common_device_error.extend({
252
271
  error_code: z
@@ -254,18 +273,22 @@ const auxiliary_heat_running = common_device_error.extend({
254
273
  .describe(error_code_description),
255
274
  }).describe(`
256
275
  ---
276
+ resource_type: device
257
277
  variant_group_key: thermostats
258
278
  ---
259
279
  Indicates that the auxiliary heat is running.
260
280
  `)
261
281
 
262
- const subscription_required = common_device_error
263
- .extend({
264
- error_code: z
265
- .literal('subscription_required')
266
- .describe(error_code_description),
267
- })
268
- .describe('Indicates that a subscription is required to connect.')
282
+ const subscription_required = common_device_error.extend({
283
+ error_code: z
284
+ .literal('subscription_required')
285
+ .describe(error_code_description),
286
+ }).describe(`
287
+ ---
288
+ resource_type: device
289
+ ---
290
+ Indicates that a subscription is required to connect.
291
+ `)
269
292
 
270
293
  const lockly_missing_wifi_bridge = common_device_error.extend({
271
294
  error_code: z
@@ -273,6 +296,7 @@ const lockly_missing_wifi_bridge = common_device_error.extend({
273
296
  .describe(error_code_description),
274
297
  }).describe(`
275
298
  ---
299
+ resource_type: device
276
300
  deprecated: Use \`hub_disconnected\` instead.
277
301
  ---
278
302
  Indicates that the Lockly lock is not connected to a Wi-Fi bridge.