@seamapi/types 1.417.0 → 1.418.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.417.0",
3
+ "version": "1.418.1",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -544,21 +544,51 @@ export const access_code = z.object({
544
544
  .string()
545
545
  .datetime()
546
546
  .describe('Date and time at which the access code was created.'),
547
- errors: z
548
- .array(
549
- z.discriminatedUnion('error_code', [
550
- ...access_code_error.options,
551
- ...device_and_connected_account_error_options,
552
- ]),
553
- )
554
- .describe(
555
- 'Errors associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).',
556
- ),
557
- warnings: z
558
- .array(access_code_warning)
559
- .describe(
560
- 'Warnings associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).',
561
- ),
547
+ errors: z.array(
548
+ z.discriminatedUnion('error_code', [
549
+ ...access_code_error.options,
550
+ ...device_and_connected_account_error_options,
551
+ ]),
552
+ ).describe(`
553
+ ---
554
+ variant_groups:
555
+ locks:
556
+ name: Locks
557
+ access_codes:
558
+ name: Access Codes
559
+ thermostats:
560
+ name: Thermostats
561
+ hardware:
562
+ name: Hardware
563
+ noise_sensors:
564
+ name: Noise Sensors
565
+ phones:
566
+ name: Phones
567
+ provider_metadata:
568
+ name: Provider Metadata
569
+ ---
570
+ Errors associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
571
+ `),
572
+ warnings: z.array(access_code_warning).describe(`
573
+ ---
574
+ variant_groups:
575
+ locks:
576
+ name: Locks
577
+ access_codes:
578
+ name: Access Codes
579
+ thermostats:
580
+ name: Thermostats
581
+ hardware:
582
+ name: Hardware
583
+ noise_sensors:
584
+ name: Noise Sensors
585
+ phones:
586
+ name: Phones
587
+ provider_metadata:
588
+ name: Provider Metadata
589
+ ---
590
+ Warnings associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
591
+ `),
562
592
  is_managed: z
563
593
  .literal(true)
564
594
  .describe('Indicates whether Seam manages the access code.'),
@@ -83,55 +83,65 @@ const account_disconnected = common_device_error
83
83
  })
84
84
  .describe('Indicates that the account is disconnected.')
85
85
 
86
- const empty_backup_access_code_pool = common_device_error
87
- .extend({
88
- error_code: z
89
- .literal('empty_backup_access_code_pool')
90
- .describe(error_code_description),
91
- })
92
- .describe(
93
- 'Indicates that the [backup access code pool](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/backup-access-codes) is empty.',
94
- )
95
-
96
- const august_lock_not_authorized = common_device_error
97
- .extend({
98
- error_code: z
99
- .literal('august_lock_not_authorized')
100
- .describe(error_code_description),
101
- })
102
- .describe('Indicates that the user is not authorized to use the August lock.')
103
-
104
- const august_lock_missing_bridge = common_device_error
105
- .extend({
106
- error_code: z
107
- .literal('august_lock_missing_bridge')
108
- .describe(error_code_description),
109
- })
110
- .describe('Indicates that the lock is not connected to a bridge.')
111
-
112
- const salto_ks_subscription_limit_exceeded = common_device_error
113
- .extend({
114
- error_code: z
115
- .literal('salto_ks_subscription_limit_exceeded')
116
- .describe(error_code_description),
117
- is_connected_account_error: z
118
- .literal(true)
119
- .describe(
120
- 'Indicates that the error is a [connected account](https://docs.seam.co/latest/api/connected_accounts) error.',
121
- ),
122
- is_device_error: z
123
- .literal(false)
124
- .describe('Indicates that the error is not a device error.'),
125
- })
126
- .describe('Indicates that the Salto site user limit has been reached.')
86
+ const empty_backup_access_code_pool = common_device_error.extend({
87
+ error_code: z
88
+ .literal('empty_backup_access_code_pool')
89
+ .describe(error_code_description),
90
+ }).describe(`
91
+ ---
92
+ variant_group_key: access_codes
93
+ ---
94
+ Indicates that the [backup access code pool](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/backup-access-codes) is empty.
95
+ `)
96
+
97
+ const august_lock_not_authorized = common_device_error.extend({
98
+ error_code: z
99
+ .literal('august_lock_not_authorized')
100
+ .describe(error_code_description),
101
+ }).describe(`
102
+ ---
103
+ variant_group_key: locks
104
+ ---
105
+ Indicates that the user is not authorized to use the August lock.
106
+ `)
107
+
108
+ const august_lock_missing_bridge = common_device_error.extend({
109
+ error_code: z
110
+ .literal('august_lock_missing_bridge')
111
+ .describe(error_code_description),
112
+ }).describe(`
113
+ ---
114
+ variant_group_key: locks
115
+ ---
116
+ Indicates that the lock is not connected to a bridge.
117
+ `)
118
+
119
+ const salto_ks_subscription_limit_exceeded = common_device_error.extend({
120
+ error_code: z
121
+ .literal('salto_ks_subscription_limit_exceeded')
122
+ .describe(error_code_description),
123
+ is_connected_account_error: z
124
+ .literal(true)
125
+ .describe(
126
+ 'Indicates that the error is a [connected account](https://docs.seam.co/latest/api/connected_accounts) error.',
127
+ ),
128
+ is_device_error: z
129
+ .literal(false)
130
+ .describe('Indicates that the error is not a device error.'),
131
+ }).describe(`
132
+ ---
133
+ variant_group_key: locks
134
+ ---
135
+ Indicates that the Salto site user limit has been reached.
136
+ `)
127
137
 
128
- const ttlock_lock_not_paired_to_gateway = common_device_error
129
- .extend({
130
- error_code: z
131
- .literal('ttlock_lock_not_paired_to_gateway')
132
- .describe(error_code_description),
133
- })
134
- .describe('Indicates that the lock is not paired with a gateway.')
138
+ const ttlock_lock_not_paired_to_gateway = common_device_error.extend({
139
+ error_code: z
140
+ .literal('ttlock_lock_not_paired_to_gateway')
141
+ .describe(error_code_description),
142
+ }).describe(`
143
+ Indicates that the lock is not paired with a gateway.
144
+ `)
135
145
 
136
146
  const missing_device_credentials = common_device_error
137
147
  .extend({
@@ -141,13 +151,13 @@ const missing_device_credentials = common_device_error
141
151
  })
142
152
  .describe('Indicates that device credentials are missing.')
143
153
 
144
- const auxiliary_heat_running = common_device_error
145
- .extend({
146
- error_code: z
147
- .literal('auxiliary_heat_running')
148
- .describe(error_code_description),
149
- })
150
- .describe('Indicates that the auxiliary heat is running.')
154
+ const auxiliary_heat_running = common_device_error.extend({
155
+ error_code: z
156
+ .literal('auxiliary_heat_running')
157
+ .describe(error_code_description),
158
+ }).describe(`
159
+ Indicates that the auxiliary heat is running.
160
+ `)
151
161
 
152
162
  const subscription_required = common_device_error
153
163
  .extend({
@@ -157,15 +167,13 @@ const subscription_required = common_device_error
157
167
  })
158
168
  .describe('Indicates that a subscription is required to connect.')
159
169
 
160
- const lockly_missing_wifi_bridge = common_device_error
161
- .extend({
162
- error_code: z
163
- .literal('lockly_missing_wifi_bridge')
164
- .describe(error_code_description),
165
- })
166
- .describe(
167
- 'Indicates that the Lockly lock is not connected to a Wi-Fi bridge.',
168
- )
170
+ const lockly_missing_wifi_bridge = common_device_error.extend({
171
+ error_code: z
172
+ .literal('lockly_missing_wifi_bridge')
173
+ .describe(error_code_description),
174
+ }).describe(`
175
+ Indicates that the Lockly lock is not connected to a Wi-Fi bridge.
176
+ `)
169
177
 
170
178
  export const device_error = z
171
179
  .discriminatedUnion('error_code', [
@@ -228,21 +236,27 @@ const common_device_warning = z.object({
228
236
  .describe('Date and time at which Seam created the warning.'),
229
237
  })
230
238
 
231
- const partial_backup_access_code_pool = common_device_warning
232
- .extend({
233
- warning_code: z
234
- .literal('partial_backup_access_code_pool')
235
- .describe(warning_code_description),
236
- })
237
- .describe('Indicates that the backup access code is unhealthy.')
238
-
239
- const many_active_backup_codes = common_device_warning
240
- .extend({
241
- warning_code: z
242
- .literal('many_active_backup_codes')
243
- .describe(warning_code_description),
244
- })
245
- .describe('Indicates that there are too many backup codes.')
239
+ const partial_backup_access_code_pool = common_device_warning.extend({
240
+ warning_code: z
241
+ .literal('partial_backup_access_code_pool')
242
+ .describe(warning_code_description),
243
+ }).describe(`
244
+ ---
245
+ variant_group_key: access_codes
246
+ ---
247
+ Indicates that the backup access code is unhealthy.
248
+ `)
249
+
250
+ const many_active_backup_codes = common_device_warning.extend({
251
+ warning_code: z
252
+ .literal('many_active_backup_codes')
253
+ .describe(warning_code_description),
254
+ }).describe(`
255
+ ---
256
+ variant_group_key: access_codes
257
+ ---
258
+ Indicates that there are too many backup codes.
259
+ `)
246
260
 
247
261
  const salto_ks_office_mode = common_device_warning
248
262
  .extend({
@@ -274,13 +288,13 @@ const salto_ks_subscription_limit_almost_reached = common_device_warning
274
288
  'Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site.',
275
289
  )
276
290
 
277
- const wyze_device_missing_gateway = common_device_warning
278
- .extend({
279
- warning_code: z
280
- .literal('wyze_device_missing_gateway')
281
- .describe(warning_code_description),
282
- })
283
- .describe('Indicates that the Wyze Lock is not connected to a gateway.')
291
+ const wyze_device_missing_gateway = common_device_warning.extend({
292
+ warning_code: z
293
+ .literal('wyze_device_missing_gateway')
294
+ .describe(warning_code_description),
295
+ }).describe(`
296
+ Indicates that the Wyze Lock is not connected to a gateway.
297
+ `)
284
298
 
285
299
  const functional_offline_device = common_device_warning
286
300
  .extend({
@@ -300,39 +314,46 @@ const third_party_integration_detected = common_device_warning
300
314
  })
301
315
  .describe('Indicates that a third-party integration has been detected.')
302
316
 
303
- const nest_thermostat_in_manual_eco_mode = common_device_warning
304
- .extend({
305
- warning_code: z
306
- .literal('nest_thermostat_in_manual_eco_mode')
307
- .describe(warning_code_description),
308
- })
309
- .describe('Indicates that the Nest thermostat is in manual eco mode.')
310
-
311
- const ttlock_lock_gateway_unlocking_not_enabled = common_device_warning
312
- .extend({
313
- warning_code: z
314
- .literal('ttlock_lock_gateway_unlocking_not_enabled')
315
- .describe(warning_code_description),
316
- })
317
- .describe(
318
- 'Indicates that the Remote Unlock feature is not enabled in the settings.',
319
- )
320
-
321
- const ttlock_weak_gateway_signal = common_device_warning
322
- .extend({
323
- warning_code: z
324
- .literal('ttlock_weak_gateway_signal')
325
- .describe(warning_code_description),
326
- })
327
- .describe('Indicates that the gateway signal is weak.')
328
-
329
- const temperature_threshold_exceeded = common_device_warning
330
- .extend({
331
- warning_code: z
332
- .literal('temperature_threshold_exceeded')
333
- .describe(warning_code_description),
334
- })
335
- .describe('Indicates that the temperature threshold has been exceeded.')
317
+ const nest_thermostat_in_manual_eco_mode = common_device_warning.extend({
318
+ warning_code: z
319
+ .literal('nest_thermostat_in_manual_eco_mode')
320
+ .describe(warning_code_description),
321
+ }).describe(`
322
+ ---
323
+ variant_group_key: thermostats
324
+ ---
325
+ Indicates that the Nest thermostat is in manual eco mode.
326
+ `)
327
+
328
+ const ttlock_lock_gateway_unlocking_not_enabled = common_device_warning.extend({
329
+ warning_code: z
330
+ .literal('ttlock_lock_gateway_unlocking_not_enabled')
331
+ .describe(warning_code_description),
332
+ }).describe(`
333
+ ---
334
+ variant_group_key: locks
335
+ ---
336
+ Indicates that the Remote Unlock feature is not enabled in the settings."
337
+ `)
338
+
339
+ const ttlock_weak_gateway_signal = common_device_warning.extend({
340
+ warning_code: z
341
+ .literal('ttlock_weak_gateway_signal')
342
+ .describe(warning_code_description),
343
+ }).describe(`
344
+ Indicates that the gateway signal is weak.
345
+ `)
346
+
347
+ const temperature_threshold_exceeded = common_device_warning.extend({
348
+ warning_code: z
349
+ .literal('temperature_threshold_exceeded')
350
+ .describe(warning_code_description),
351
+ }).describe(`
352
+ ---
353
+ variant_group_key: thermostats
354
+ ---
355
+ Indicates that the temperature threshold has been exceeded.
356
+ `)
336
357
 
337
358
  const device_communication_degraded = common_device_warning
338
359
  .extend({
@@ -368,15 +389,16 @@ const lockly_time_zone_not_configured = common_device_warning
368
389
  'Indicates that Seam detected that the Lockly device does not have a time zone configured. Time-bound codes may not work as expected.',
369
390
  )
370
391
 
371
- export const unknown_issue_with_phone = common_device_warning
372
- .extend({
373
- warning_code: z
374
- .literal('unknown_issue_with_phone')
375
- .describe(warning_code_description),
376
- })
377
- .describe(
378
- 'Indicates that an unknown issue occurred while syncing the state of the phone with the provider. This issue may affect the proper functioning of the phone.',
379
- )
392
+ export const unknown_issue_with_phone = common_device_warning.extend({
393
+ warning_code: z
394
+ .literal('unknown_issue_with_phone')
395
+ .describe(warning_code_description),
396
+ }).describe(`
397
+ ---
398
+ variant_group_key: phones
399
+ ---
400
+ Indicates that an unknown issue occurred while syncing the state of the phone with the provider. This issue may affect the proper functioning of the phone.
401
+ `)
380
402
 
381
403
  const device_warning = z.discriminatedUnion('warning_code', [
382
404
  partial_backup_access_code_pool,
@@ -717,28 +739,58 @@ export const device = z
717
739
  .describe(
718
740
  'Unique identifier for the Seam workspace associated with the device.',
719
741
  ),
720
- errors: z
721
- .array(
722
- z.discriminatedUnion('error_code', [
723
- ...device_error.options,
724
- ...connected_account_error.options.filter(
725
- (_connected_account_error) =>
726
- !device_error.options.some(
727
- (_device_error) =>
728
- _device_error.shape.error_code.value ===
729
- _connected_account_error.shape.error_code.value,
730
- ),
731
- ),
732
- ]),
733
- )
734
- .describe(
735
- 'Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.',
736
- ),
737
- warnings: z
738
- .array(device_warning)
739
- .describe(
740
- 'Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.',
741
- ),
742
+ errors: z.array(
743
+ z.discriminatedUnion('error_code', [
744
+ ...device_error.options,
745
+ ...connected_account_error.options.filter(
746
+ (_connected_account_error) =>
747
+ !device_error.options.some(
748
+ (_device_error) =>
749
+ _device_error.shape.error_code.value ===
750
+ _connected_account_error.shape.error_code.value,
751
+ ),
752
+ ),
753
+ ]),
754
+ ).describe(`
755
+ ---
756
+ variant_groups:
757
+ locks:
758
+ name: Locks
759
+ access_codes:
760
+ name: Access Codes
761
+ thermostats:
762
+ name: Thermostats
763
+ hardware:
764
+ name: Hardware
765
+ noise_sensors:
766
+ name: Noise Sensors
767
+ phones:
768
+ name: Phones
769
+ provider_metadata:
770
+ name: Provider Metadata
771
+ ---
772
+ Array of errors associated with the device. Each error object within the array contains two fields: \`error_code\` and \`message\`. \`error_code\` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. \`message\` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.
773
+ `),
774
+ warnings: z.array(device_warning).describe(`
775
+ ---
776
+ variant_groups:
777
+ locks:
778
+ name: Locks
779
+ access_codes:
780
+ name: Access Codes
781
+ thermostats:
782
+ name: Thermostats
783
+ hardware:
784
+ name: Hardware
785
+ noise_sensors:
786
+ name: Noise Sensors
787
+ phones:
788
+ name: Phones
789
+ provider_metadata:
790
+ name: Provider Metadata
791
+ ---
792
+ Array of warnings associated with the device. Each warning object within the array contains two fields: \`warning_code\` and \`message\`. \`warning_code\` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. \`message\` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.
793
+ `),
742
794
  created_at: z
743
795
  .string()
744
796
  .datetime()