@seamapi/types 1.363.1 → 1.365.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 (51) hide show
  1. package/dist/connect.cjs +855 -45
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +2125 -542
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +464 -109
  8. package/lib/seam/connect/models/access-codes/managed-access-code.js +74 -17
  9. package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
  10. package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +156 -26
  11. package/lib/seam/connect/models/acs/acs-access-group.js +1 -2
  12. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  13. package/lib/seam/connect/models/acs/acs-credential.js +1 -2
  14. package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
  15. package/lib/seam/connect/models/acs/acs-system.d.ts +1 -1
  16. package/lib/seam/connect/models/acs/acs-system.js +2 -2
  17. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  18. package/lib/seam/connect/models/acs/acs-user.d.ts +8 -8
  19. package/lib/seam/connect/models/acs/acs-user.js +1 -2
  20. package/lib/seam/connect/models/acs/acs-user.js.map +1 -1
  21. package/lib/seam/connect/models/connected-accounts/connected-account.js +1 -2
  22. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  23. package/lib/seam/connect/models/devices/device.js +1 -2
  24. package/lib/seam/connect/models/devices/device.js.map +1 -1
  25. package/lib/seam/connect/models/index.d.ts +1 -0
  26. package/lib/seam/connect/models/index.js +1 -0
  27. package/lib/seam/connect/models/index.js.map +1 -1
  28. package/lib/seam/connect/models/locations/index.d.ts +1 -0
  29. package/lib/seam/connect/models/locations/index.js +2 -0
  30. package/lib/seam/connect/models/locations/index.js.map +1 -0
  31. package/lib/seam/connect/models/locations/location.d.ts +49 -0
  32. package/lib/seam/connect/models/locations/location.js +25 -0
  33. package/lib/seam/connect/models/locations/location.js.map +1 -0
  34. package/lib/seam/connect/openapi.d.ts +803 -0
  35. package/lib/seam/connect/openapi.js +813 -28
  36. package/lib/seam/connect/openapi.js.map +1 -1
  37. package/lib/seam/connect/route-types.d.ts +494 -54
  38. package/package.json +1 -1
  39. package/src/lib/seam/connect/internal/schemas.ts +2 -0
  40. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +80 -19
  41. package/src/lib/seam/connect/models/acs/acs-access-group.ts +1 -2
  42. package/src/lib/seam/connect/models/acs/acs-credential.ts +1 -2
  43. package/src/lib/seam/connect/models/acs/acs-system.ts +2 -2
  44. package/src/lib/seam/connect/models/acs/acs-user.ts +1 -2
  45. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +1 -2
  46. package/src/lib/seam/connect/models/devices/device.ts +1 -2
  47. package/src/lib/seam/connect/models/index.ts +1 -0
  48. package/src/lib/seam/connect/models/locations/index.ts +1 -0
  49. package/src/lib/seam/connect/models/locations/location.ts +30 -0
  50. package/src/lib/seam/connect/openapi.ts +838 -32
  51. package/src/lib/seam/connect/route-types.ts +560 -63
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.363.1",
3
+ "version": "1.365.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -34,6 +34,8 @@ export {
34
34
  seam_event as event,
35
35
  seam_event_type as event_type,
36
36
  fan_mode_setting,
37
+ geolocation,
38
+ location,
37
39
  lock_device_type,
38
40
  access_code as managed_access_code,
39
41
  device as managed_device,
@@ -137,6 +137,14 @@ const august_device_slots_full = common_access_code_error
137
137
  })
138
138
  .describe('All access code slots on the device are full.')
139
139
 
140
+ const august_lock_temporarily_offline_error = common_access_code_error
141
+ .extend({
142
+ error_code: z
143
+ .literal('august_lock_temporarily_offline')
144
+ .describe(error_code_description),
145
+ })
146
+ .describe('August lock is temporarily offline.')
147
+
140
148
  const august_lock_missing_keypad = common_access_code_error
141
149
  .extend({
142
150
  error_code: z
@@ -145,10 +153,10 @@ const august_lock_missing_keypad = common_access_code_error
145
153
  })
146
154
  .describe('August lock is missing a keypad.')
147
155
 
148
- const salto_site_user_not_subscribed = common_access_code_error
156
+ const salto_ks_user_not_subscribed = common_access_code_error
149
157
  .extend({
150
158
  error_code: z
151
- .literal('salto_site_user_not_subscribed')
159
+ .literal('salto_ks_user_not_subscribed')
152
160
  .describe(error_code_description),
153
161
  })
154
162
  .describe('Salto site user is not subscribed.')
@@ -169,9 +177,42 @@ const hubitat_no_free_positions_available = common_access_code_error
169
177
  })
170
178
  .describe('No free positions available on the device.')
171
179
 
180
+ const smartthings_no_free_slots_available = common_access_code_error
181
+ .extend({
182
+ error_code: z
183
+ .literal('smartthings_no_free_slots_available')
184
+ .describe(error_code_description),
185
+ })
186
+ .describe('No free slots available on the device.')
187
+
188
+ const wyze_duplicate_code_name = common_access_code_error
189
+ .extend({
190
+ error_code: z
191
+ .literal('wyze_duplicate_code_name')
192
+ .describe(error_code_description),
193
+ })
194
+ .describe('Duplicate access code name detected.')
195
+
196
+ const wyze_potential_duplicate_code = common_access_code_error
197
+ .extend({
198
+ error_code: z
199
+ .literal('wyze_potential_duplicate_code')
200
+ .describe(error_code_description),
201
+ })
202
+ .describe('Potential duplicate access code detected.')
203
+
204
+ const dormakaba_oracode_no_valid_user_level = common_access_code_error
205
+ .extend({
206
+ error_code: z
207
+ .literal('dormakaba_oracode_no_valid_user_level')
208
+ .describe(error_code_description),
209
+ })
210
+ .describe('No valid user level for Oracode.')
211
+
172
212
  const access_code_error = z.discriminatedUnion('error_code', [
173
213
  smartthings_failed_to_set_access_code_error,
174
214
  smartthings_failed_to_set_after_multiple_retries,
215
+ smartthings_no_free_slots_available,
175
216
  failed_to_set_on_device,
176
217
  failed_to_remove_from_device,
177
218
  duplicate_code_on_device,
@@ -186,18 +227,25 @@ const access_code_error = z.discriminatedUnion('error_code', [
186
227
  august_device_programming_delay_error,
187
228
  august_device_slots_full,
188
229
  august_lock_missing_keypad,
189
- salto_site_user_not_subscribed,
230
+ august_lock_temporarily_offline_error,
231
+ salto_ks_user_not_subscribed,
190
232
  hubitat_device_programming_delay,
191
233
  hubitat_no_free_positions_available,
234
+ wyze_duplicate_code_name,
235
+ wyze_potential_duplicate_code,
236
+ dormakaba_oracode_no_valid_user_level,
192
237
  ])
193
238
 
194
239
  export type AccessCodeError = z.infer<typeof access_code_error>
195
240
 
196
241
  const access_code_error_map = z.object({
197
- smartthings_failed_to_set_access_code_error:
242
+ smartthings_failed_to_set_access_code:
198
243
  smartthings_failed_to_set_access_code_error.optional().nullable(),
199
244
  smartthings_failed_to_set_after_multiple_retries:
200
245
  smartthings_failed_to_set_after_multiple_retries.optional().nullable(),
246
+ smartthings_no_free_slots_available: smartthings_no_free_slots_available
247
+ .optional()
248
+ .nullable(),
201
249
  failed_to_set_on_device: failed_to_set_on_device.optional().nullable(),
202
250
  failed_to_remove_from_device: failed_to_remove_from_device
203
251
  .optional()
@@ -224,12 +272,15 @@ const access_code_error_map = z.object({
224
272
  august_lock_invalid_code_length: august_lock_invalid_code_length
225
273
  .optional()
226
274
  .nullable(),
227
- august_device_programming_delay_error: august_device_programming_delay_error
275
+ august_device_programming_delay: august_device_programming_delay_error
276
+ .optional()
277
+ .nullable(),
278
+ august_lock_temporarily_offline: august_lock_temporarily_offline_error
228
279
  .optional()
229
280
  .nullable(),
230
281
  august_device_slots_full: august_device_slots_full.optional().nullable(),
231
282
  august_lock_missing_keypad: august_lock_missing_keypad.optional().nullable(),
232
- salto_site_user_not_subscribed: salto_site_user_not_subscribed
283
+ salto_ks_user_not_subscribed: salto_ks_user_not_subscribed
233
284
  .optional()
234
285
  .nullable(),
235
286
  hubitat_device_programming_delay: hubitat_device_programming_delay
@@ -238,6 +289,13 @@ const access_code_error_map = z.object({
238
289
  hubitat_no_free_positions_available: hubitat_no_free_positions_available
239
290
  .optional()
240
291
  .nullable(),
292
+ wyze_duplicate_code_name: wyze_duplicate_code_name.optional().nullable(),
293
+ wyze_potential_duplicate_code: wyze_potential_duplicate_code
294
+ .optional()
295
+ .nullable(),
296
+ dormakaba_oracode_no_valid_user_level: dormakaba_oracode_no_valid_user_level
297
+ .optional()
298
+ .nullable(),
241
299
  })
242
300
 
243
301
  export type AccessCodeErrorMap = z.infer<typeof access_code_error_map>
@@ -266,6 +324,14 @@ const august_device_programming_delay_warning = common_access_code_warning
266
324
  })
267
325
  .describe('Access code has not yet been fully moved to the device.')
268
326
 
327
+ const august_lock_temporarily_offline_warning = common_access_code_warning
328
+ .extend({
329
+ warning_code: z
330
+ .literal('august_lock_temporarily_offline')
331
+ .describe(error_code_description),
332
+ })
333
+ .describe('August lock is temporarily offline.')
334
+
269
335
  const code_modified_external_to_seam_warning = common_access_code_warning
270
336
  .extend({
271
337
  warning_code: z
@@ -292,14 +358,6 @@ const schlage_creation_outage = common_access_code_warning
292
358
  })
293
359
  .describe('Received an error when attempting to create this code.')
294
360
 
295
- const salto_office_mode = common_access_code_warning
296
- .extend({
297
- warning_code: z
298
- .literal('salto_office_mode')
299
- .describe(warning_code_description),
300
- })
301
- .describe('Lock is in Office Mode. Access Codes will not unlock doors.')
302
-
303
361
  const delay_in_setting_on_device = common_access_code_warning
304
362
  .extend({
305
363
  warning_code: z
@@ -354,12 +412,12 @@ const access_code_warning = z.discriminatedUnion('warning_code', [
354
412
  smartthings_failed_to_set_access_code_warning,
355
413
  schlage_detected_duplicate,
356
414
  schlage_creation_outage,
357
- salto_office_mode,
358
415
  code_modified_external_to_seam_warning,
359
416
  delay_in_setting_on_device,
360
417
  delay_in_removing_from_device,
361
418
  third_party_integration_detected,
362
419
  august_device_programming_delay_warning,
420
+ august_lock_temporarily_offline_warning,
363
421
  igloo_algopin_must_be_used_within_24_hours,
364
422
  management_transferred,
365
423
  kwikset_unable_to_confirm_code_warning,
@@ -368,11 +426,10 @@ const access_code_warning = z.discriminatedUnion('warning_code', [
368
426
  export type AccessCodeWarning = z.infer<typeof access_code_warning>
369
427
 
370
428
  const access_code_warning_map = z.object({
371
- smartthings_failed_to_set_access_code_warning:
429
+ smartthings_failed_to_set_access_code:
372
430
  smartthings_failed_to_set_access_code_warning.optional().nullable(),
373
431
  schlage_detected_duplicate: schlage_detected_duplicate.optional().nullable(),
374
432
  schlage_creation_outage: schlage_creation_outage.optional().nullable(),
375
- salto_office_mode: salto_office_mode.optional().nullable(),
376
433
  code_modified_external_to_seam_warning: code_modified_external_to_seam_warning
377
434
  .optional()
378
435
  .nullable(),
@@ -383,8 +440,12 @@ const access_code_warning_map = z.object({
383
440
  third_party_integration_detected: third_party_integration_detected
384
441
  .optional()
385
442
  .nullable(),
386
- august_device_programming_delay_warning:
387
- august_device_programming_delay_warning.optional().nullable(),
443
+ august_device_programming_delay: august_device_programming_delay_warning
444
+ .optional()
445
+ .nullable(),
446
+ august_lock_temporarily_offline: august_lock_temporarily_offline_warning
447
+ .optional()
448
+ .nullable(),
388
449
  igloo_algopin_must_be_used_within_24_hours:
389
450
  igloo_algopin_must_be_used_within_24_hours.optional().nullable(),
390
451
  management_transferred: management_transferred.optional().nullable(),
@@ -37,8 +37,7 @@ export const unknown_issue_with_acs_access_group =
37
37
  .describe(warning_code_description),
38
38
  })
39
39
  .describe(
40
- 'An unknown issue occurred while syncing the state of this access group with the provider. ' +
41
- 'This issue may affect the proper functioning of this access group.',
40
+ 'An unknown issue occurred while syncing the state of this access group with the provider. This issue may affect the proper functioning of this access group.',
42
41
  )
43
42
 
44
43
  const acs_access_group_warning = unknown_issue_with_acs_access_group.describe(
@@ -86,8 +86,7 @@ export const unknown_issue_with_acs_credential = common_acs_credential_warning
86
86
  .describe(warning_code_description),
87
87
  })
88
88
  .describe(
89
- 'An unknown issue occurred while syncing the state of the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) with the provider. ' +
90
- 'This issue may affect the proper functioning of the credential.',
89
+ 'An unknown issue occurred while syncing the state of the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) with the provider. This issue may affect the proper functioning of the credential.',
91
90
  )
92
91
 
93
92
  const needs_to_be_reissued = common_acs_credential_warning
@@ -27,7 +27,7 @@ export const acs_system_capability_flags = z.object({
27
27
  ),
28
28
  })
29
29
 
30
- export const location = z.object({
30
+ export const acs_location = z.object({
31
31
  time_zone: z
32
32
  .string()
33
33
  .nullable()
@@ -274,7 +274,7 @@ export const acs_system = z
274
274
  deprecated: Use \`external_type_display_name\`.
275
275
  ---
276
276
  `),
277
- location,
277
+ location: acs_location,
278
278
  name: z
279
279
  .string()
280
280
  .describe(
@@ -129,8 +129,7 @@ export const unknown_issue_with_acs_user = common_acs_user_warning
129
129
  warning_code: z.literal('unknown_issue_with_acs_user'),
130
130
  })
131
131
  .describe(
132
- 'An unknown issue occurred while syncing the state of this [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) with the provider. ' +
133
- 'This issue may affect the proper functioning of this user.',
132
+ 'An unknown issue occurred while syncing the state of this [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) with the provider. This issue may affect the proper functioning of this user.',
134
133
  )
135
134
 
136
135
  export const acs_users_warning_map = z.object({
@@ -88,8 +88,7 @@ export const unknown_issue_with_connected_account =
88
88
  .describe(warning_code_description),
89
89
  })
90
90
  .describe(
91
- 'An unknown issue occurred while syncing the state of this connected account with the provider. ' +
92
- 'This issue may affect the proper functioning of one or more resources in this account.',
91
+ 'An unknown issue occurred while syncing the state of this connected account with the provider. This issue may affect the proper functioning of one or more resources in this account.',
93
92
  )
94
93
 
95
94
  const scheduled_maintenance_window = common_connected_account_warning
@@ -313,8 +313,7 @@ export const unknown_issue_with_phone = common_device_warning
313
313
  .describe(warning_code_description),
314
314
  })
315
315
  .describe(
316
- 'An unknown issue occurred while syncing the state of this phone with the provider. ' +
317
- 'This issue may affect the proper functioning of this phone.',
316
+ 'An unknown issue occurred while syncing the state of this phone with the provider. This issue may affect the proper functioning of this phone.',
318
317
  )
319
318
 
320
319
  const device_warning = z.discriminatedUnion('warning_code', [
@@ -9,6 +9,7 @@ export * from './connected-accounts/index.js'
9
9
  export * from './custom-metadata.js'
10
10
  export * from './devices/index.js'
11
11
  export * from './events/index.js'
12
+ export * from './locations/index.js'
12
13
  export * from './noise-sensors/index.js'
13
14
  export * from './pagination.js'
14
15
  export * from './phone-number.js'
@@ -0,0 +1 @@
1
+ export * from './location.js'
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod'
2
+
3
+ export const geolocation = z.object({
4
+ latitude: z.number(),
5
+ longitude: z.number(),
6
+ })
7
+
8
+ export const location = z.object({
9
+ location_id: z
10
+ .string()
11
+ .uuid()
12
+ .describe('Unique identifier for the location.'),
13
+ workspace_id: z
14
+ .string()
15
+ .uuid()
16
+ .describe(
17
+ 'Unique identifier for the Seam workspace associated with the location.',
18
+ ),
19
+ display_name: z.string().describe('Display name of the location.'),
20
+ geolocation: geolocation
21
+ .optional()
22
+ .describe('Geographical location of the location.'),
23
+ time_zone: z.string().optional().describe('Time zone of the location.'),
24
+ created_at: z
25
+ .string()
26
+ .datetime()
27
+ .describe('Date and time at which the location object was created.'),
28
+ })
29
+
30
+ export type Location = z.infer<typeof location>