@seamapi/types 1.1003.0 → 1.1005.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 (52) hide show
  1. package/lib/seam/connect/models/access-grants/access-method.d.ts +6 -0
  2. package/lib/seam/connect/models/access-grants/access-method.js +3 -0
  3. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  4. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +5 -0
  5. package/lib/seam/connect/models/action-attempts/assign-credential.d.ts +5 -0
  6. package/lib/seam/connect/openapi.js +15 -0
  7. package/lib/seam/connect/openapi.js.map +1 -1
  8. package/lib/seam/connect/route-types.d.ts +82 -0
  9. package/package.json +4 -11
  10. package/src/lib/seam/connect/models/access-grants/access-method.ts +5 -0
  11. package/src/lib/seam/connect/openapi.ts +18 -0
  12. package/src/lib/seam/connect/route-types.ts +82 -0
  13. package/devicedb.d.ts +0 -1
  14. package/devicedb.js +0 -2
  15. package/devicedb.js.map +0 -1
  16. package/lib/seam/devicedb/index.d.ts +0 -5
  17. package/lib/seam/devicedb/index.js +0 -5
  18. package/lib/seam/devicedb/index.js.map +0 -1
  19. package/lib/seam/devicedb/models/device-capability.d.ts +0 -57
  20. package/lib/seam/devicedb/models/device-capability.js +0 -27
  21. package/lib/seam/devicedb/models/device-capability.js.map +0 -1
  22. package/lib/seam/devicedb/models/device-model.d.ts +0 -1247
  23. package/lib/seam/devicedb/models/device-model.js +0 -136
  24. package/lib/seam/devicedb/models/device-model.js.map +0 -1
  25. package/lib/seam/devicedb/models/hardware.d.ts +0 -8
  26. package/lib/seam/devicedb/models/hardware.js +0 -7
  27. package/lib/seam/devicedb/models/hardware.js.map +0 -1
  28. package/lib/seam/devicedb/models/image-reference.d.ts +0 -15
  29. package/lib/seam/devicedb/models/image-reference.js +0 -7
  30. package/lib/seam/devicedb/models/image-reference.js.map +0 -1
  31. package/lib/seam/devicedb/models/index.d.ts +0 -4
  32. package/lib/seam/devicedb/models/index.js +0 -5
  33. package/lib/seam/devicedb/models/index.js.map +0 -1
  34. package/lib/seam/devicedb/models/manufacturer.d.ts +0 -117
  35. package/lib/seam/devicedb/models/manufacturer.js +0 -38
  36. package/lib/seam/devicedb/models/manufacturer.js.map +0 -1
  37. package/lib/seam/devicedb/route-specs.d.ts +0 -2052
  38. package/lib/seam/devicedb/route-specs.js +0 -61
  39. package/lib/seam/devicedb/route-specs.js.map +0 -1
  40. package/lib/seam/devicedb/route-types.d.ts +0 -364
  41. package/lib/seam/devicedb/route-types.js +0 -2
  42. package/lib/seam/devicedb/route-types.js.map +0 -1
  43. package/src/devicedb.ts +0 -1
  44. package/src/lib/seam/devicedb/index.ts +0 -16
  45. package/src/lib/seam/devicedb/models/device-capability.ts +0 -32
  46. package/src/lib/seam/devicedb/models/device-model.ts +0 -166
  47. package/src/lib/seam/devicedb/models/hardware.ts +0 -7
  48. package/src/lib/seam/devicedb/models/image-reference.ts +0 -9
  49. package/src/lib/seam/devicedb/models/index.ts +0 -4
  50. package/src/lib/seam/devicedb/models/manufacturer.ts +0 -54
  51. package/src/lib/seam/devicedb/route-specs.ts +0 -63
  52. package/src/lib/seam/devicedb/route-types.ts +0 -450
@@ -1,54 +0,0 @@
1
- import { z } from 'zod'
2
-
3
- import { image_reference } from './image-reference.js'
4
-
5
- export const manufacturer_integration_support_level = z.enum([
6
- 'stable',
7
- 'beta',
8
- 'planned',
9
- 'unsupported',
10
- 'inquire',
11
- ])
12
-
13
- export type ManufacturerIntegrationSupportLevel = z.infer<
14
- typeof manufacturer_integration_support_level
15
- >
16
-
17
- export const manufacturer_annotation_code = z.enum(['subscription_required'])
18
-
19
- export type ManufacturerAnnotationCode = z.infer<
20
- typeof manufacturer_annotation_code
21
- >
22
-
23
- export const manufacturer_annotation = z.object({
24
- annotation_code: manufacturer_annotation_code,
25
- message: z.string().trim().nonempty(),
26
- })
27
-
28
- export type ManufacturerAnnotation = z.infer<typeof manufacturer_annotation>
29
-
30
- export const manufacturer = z.object({
31
- manufacturer_id: z.string().uuid(),
32
- display_name: z.string(),
33
- logo: image_reference.optional(),
34
- /** @deprecated */
35
- integration: manufacturer_integration_support_level,
36
- integration_support_level: manufacturer_integration_support_level,
37
- is_connect_webview_supported: z.boolean(),
38
- requires_seam_support_to_add_account: z.boolean(),
39
- device_model_count: z.number(),
40
- annotations: z.array(manufacturer_annotation),
41
- website: z.string().url().optional(),
42
- legal_name: z.string().optional(),
43
- parent_organization: z.string().optional(),
44
- headquarters: z.array(z.string()).optional(),
45
- countries_of_origin: z.array(z.string()).optional(),
46
- founding_year: z.string().optional(),
47
- us_customer_support_tel: z.string().optional(),
48
- us_customer_support_email: z.string().email().optional(),
49
- us_customer_support_contact_url: z.string().url().optional(),
50
- seam_api_guide: z.string().optional(),
51
- description: z.string().optional(),
52
- })
53
-
54
- export type Manufacturer = z.infer<typeof manufacturer>
@@ -1,63 +0,0 @@
1
- import { z } from 'zod'
2
-
3
- import * as schemas from './models/index.js'
4
-
5
- const dot_path = z.string().regex(/^([a-z])[a-z_.]*[a-z]+$/)
6
-
7
- export const routes = {
8
- '/api/v1/device_models/get': {
9
- auth: 'publishable_key',
10
- methods: ['GET', 'OPTIONS'],
11
- queryParams: z.object({
12
- device_model_id: z.string().uuid(),
13
- }),
14
- jsonResponse: z.object({
15
- device_model: schemas.device_model_v1,
16
- }),
17
- },
18
- '/api/v1/device_models/list': {
19
- auth: 'publishable_key',
20
- methods: ['GET', 'OPTIONS'],
21
- queryParams: z.object({
22
- main_category: schemas.device_category.optional(),
23
- manufacturer_id: z.string().uuid().optional(),
24
- manufacturer_ids: z.string().uuid().array().optional(),
25
- /** @deprecated */
26
- integration_status: schemas.manufacturer.shape.integration.optional(),
27
- integration_support_levels: z
28
- .array(schemas.manufacturer_integration_support_level)
29
- .optional(),
30
- text_search: z.string().optional(),
31
- include_if: z.array(dot_path).optional(),
32
- exclude_if: z.array(dot_path).optional(),
33
- }),
34
- jsonResponse: z.object({
35
- device_models: schemas.device_model_v1.array(),
36
- }),
37
- },
38
- '/api/v1/manufacturers/get': {
39
- auth: 'publishable_key',
40
- methods: ['GET', 'OPTIONS'],
41
- queryParams: z.object({
42
- manufacturer_id: z.string().uuid(),
43
- }),
44
- jsonResponse: z.object({
45
- manufacturer: schemas.manufacturer,
46
- }),
47
- },
48
- '/api/v1/manufacturers/list': {
49
- auth: 'publishable_key',
50
- methods: ['GET', 'OPTIONS'],
51
- queryParams: z.object({
52
- /** @deprecated */
53
- integration_status: schemas.manufacturer.shape.integration.optional(),
54
- integration_support_levels: z
55
- .array(schemas.manufacturer_integration_support_level)
56
- .optional(),
57
- liqe_query: z.string().optional(),
58
- }),
59
- jsonResponse: z.object({
60
- manufacturers: schemas.manufacturer.array(),
61
- }),
62
- },
63
- } as const
@@ -1,450 +0,0 @@
1
- export interface Routes {
2
- '/v1/device_models/get': {
3
- route: '/v1/device_models/get'
4
- method: 'GET' | 'OPTIONS'
5
- queryParams: {
6
- device_model_id: string
7
- }
8
- jsonBody: {}
9
- commonParams: {}
10
- formData: {}
11
- jsonResponse: {
12
- device_model: {
13
- device_model_id: string
14
- manufacturer: {
15
- manufacturer_id: string
16
- display_name: string
17
- logo?:
18
- | {
19
- url: string
20
- width: number
21
- height: number
22
- }
23
- | undefined
24
- integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
25
- integration_support_level:
26
- 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
27
- is_connect_webview_supported: boolean
28
- requires_seam_support_to_add_account: boolean
29
- annotations: Array<{
30
- annotation_code: 'subscription_required'
31
- message: string
32
- }>
33
- website?: string | undefined
34
- legal_name?: string | undefined
35
- parent_organization?: string | undefined
36
- headquarters?: string[] | undefined
37
- countries_of_origin?: string[] | undefined
38
- founding_year?: string | undefined
39
- us_customer_support_tel?: string | undefined
40
- us_customer_support_email?: string | undefined
41
- us_customer_support_contact_url?: string | undefined
42
- seam_api_guide?: string | undefined
43
- description?: string | undefined
44
- }
45
- is_device_supported: boolean
46
- display_name: string
47
- description: string
48
- product_url?: string | undefined
49
- main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
50
- hardware: {
51
- has_physical_key?: boolean | undefined
52
- }
53
- aesthetic_variants: Array<{
54
- slug: string
55
- display_name: string
56
- primary_color_hex?: string | undefined
57
- manufacturer_sku?: string | undefined
58
- front_image?:
59
- | {
60
- url: string
61
- width: number
62
- height: number
63
- }
64
- | undefined
65
- back_image?:
66
- | {
67
- url: string
68
- width: number
69
- height: number
70
- }
71
- | undefined
72
- images: Array<{
73
- url: string
74
- width: number
75
- height: number
76
- }>
77
- }>
78
- power_sources: Array<
79
- | 'battery'
80
- | 'hardwired'
81
- | 'mechanical_harvesting'
82
- | 'wireless'
83
- | 'ethernet'
84
- >
85
- } & (
86
- | {
87
- main_category: 'smartlock'
88
- physical_properties: {
89
- lock_type:
90
- | 'deadbolt'
91
- | 'lever'
92
- | 'mortise'
93
- | 'lockbox'
94
- | 'cylinder'
95
- | 'padlock'
96
- | 'locker'
97
- | 'unknown'
98
- has_physical_key: boolean
99
- has_camera: boolean
100
- }
101
- software_features: {
102
- can_remotely_unlock: boolean
103
- can_program_access_codes: boolean
104
- can_program_access_schedules: boolean
105
- can_program_access_codes_offline: boolean
106
- }
107
- can_remotely_lock?: true | undefined
108
- can_remotely_unlock?: true | undefined
109
- can_program_offline_access_codes?: true | undefined
110
- can_program_online_access_codes?: true | undefined
111
- }
112
- | {
113
- main_category: 'sensor'
114
- physical_properties: {
115
- has_noise_sensor: boolean
116
- has_humidity_sensor: boolean
117
- has_temperature_sensor: boolean
118
- has_occupancy_detection: boolean
119
- }
120
- }
121
- | {
122
- main_category: 'thermostat'
123
- physical_properties: {
124
- available_modes: Array<'heat' | 'cool' | 'fan' | 'eco'>
125
- is_heat_pump_compatible: boolean
126
- has_occupancy_detection: boolean
127
- supports_demand_response: boolean
128
- has_humidity_sensor: boolean
129
- has_temperature_sensor: boolean
130
- supports_emergency_heating_mode: boolean
131
- }
132
- software_features: {
133
- can_program_climate_schedules: boolean
134
- }
135
- can_hvac_heat?: true | undefined
136
- can_hvac_cool?: true | undefined
137
- can_hvac_heat_cool?: true | undefined
138
- can_turn_off_hvac?: true | undefined
139
- }
140
- | {
141
- main_category: 'relay'
142
- }
143
- | {
144
- main_category: 'intercom'
145
- physical_properties: {
146
- has_camera: boolean
147
- has_rfid_reader?: boolean
148
- has_nfc_reader?: boolean
149
- has_wiegand_interface?: boolean
150
- }
151
- software_features: {
152
- can_remotely_unlock: boolean
153
- can_program_access_codes: boolean
154
- can_unlock_with_face_recognition?: boolean
155
- supports_onvif?: boolean
156
- }
157
- }
158
- | {
159
- main_category: 'accessory'
160
- }
161
- )
162
- }
163
- }
164
- '/v1/device_models/list': {
165
- route: '/v1/device_models/list'
166
- method: 'GET' | 'OPTIONS'
167
- queryParams: {
168
- main_category?:
169
- | (
170
- | 'smartlock'
171
- | 'sensor'
172
- | 'thermostat'
173
- | 'relay'
174
- | 'intercom'
175
- | 'accessory'
176
- )
177
- | undefined
178
- manufacturer_id?: string | undefined
179
- manufacturer_ids?: string[] | undefined
180
- integration_status?:
181
- ('stable' | 'beta' | 'planned' | 'unsupported' | 'inquire') | undefined
182
- integration_support_levels?:
183
- | Array<'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'>
184
- | undefined
185
- text_search?: string | undefined
186
- include_if?: string[] | undefined
187
- exclude_if?: string[] | undefined
188
- }
189
- jsonBody: {}
190
- commonParams: {}
191
- formData: {}
192
- jsonResponse: {
193
- device_models: Array<
194
- {
195
- device_model_id: string
196
- manufacturer: {
197
- manufacturer_id: string
198
- display_name: string
199
- logo?:
200
- | {
201
- url: string
202
- width: number
203
- height: number
204
- }
205
- | undefined
206
- integration:
207
- 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
208
- integration_support_level:
209
- 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
210
- is_connect_webview_supported: boolean
211
- requires_seam_support_to_add_account: boolean
212
- annotations: Array<{
213
- annotation_code: 'subscription_required'
214
- message: string
215
- }>
216
- website?: string | undefined
217
- legal_name?: string | undefined
218
- parent_organization?: string | undefined
219
- headquarters?: string[] | undefined
220
- countries_of_origin?: string[] | undefined
221
- founding_year?: string | undefined
222
- us_customer_support_tel?: string | undefined
223
- us_customer_support_email?: string | undefined
224
- us_customer_support_contact_url?: string | undefined
225
- seam_api_guide?: string | undefined
226
- description?: string | undefined
227
- }
228
- is_device_supported: boolean
229
- display_name: string
230
- description: string
231
- product_url?: string | undefined
232
- main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
233
- hardware: {
234
- has_physical_key?: boolean | undefined
235
- }
236
- aesthetic_variants: Array<{
237
- slug: string
238
- display_name: string
239
- primary_color_hex?: string | undefined
240
- manufacturer_sku?: string | undefined
241
- front_image?:
242
- | {
243
- url: string
244
- width: number
245
- height: number
246
- }
247
- | undefined
248
- back_image?:
249
- | {
250
- url: string
251
- width: number
252
- height: number
253
- }
254
- | undefined
255
- images: Array<{
256
- url: string
257
- width: number
258
- height: number
259
- }>
260
- }>
261
- power_sources: Array<
262
- | 'battery'
263
- | 'hardwired'
264
- | 'mechanical_harvesting'
265
- | 'wireless'
266
- | 'ethernet'
267
- >
268
- } & (
269
- | {
270
- main_category: 'smartlock'
271
- physical_properties: {
272
- lock_type:
273
- | 'deadbolt'
274
- | 'lever'
275
- | 'mortise'
276
- | 'lockbox'
277
- | 'cylinder'
278
- | 'padlock'
279
- | 'locker'
280
- | 'unknown'
281
- has_physical_key: boolean
282
- has_camera: boolean
283
- }
284
- software_features: {
285
- can_remotely_unlock: boolean
286
- can_program_access_codes: boolean
287
- can_program_access_schedules: boolean
288
- can_program_access_codes_offline: boolean
289
- }
290
- can_remotely_lock?: true | undefined
291
- can_remotely_unlock?: true | undefined
292
- can_program_offline_access_codes?: true | undefined
293
- can_program_online_access_codes?: true | undefined
294
- }
295
- | {
296
- main_category: 'sensor'
297
- physical_properties: {
298
- has_noise_sensor: boolean
299
- has_humidity_sensor: boolean
300
- has_temperature_sensor: boolean
301
- has_occupancy_detection: boolean
302
- }
303
- }
304
- | {
305
- main_category: 'thermostat'
306
- physical_properties: {
307
- available_modes: Array<'heat' | 'cool' | 'fan' | 'eco'>
308
- is_heat_pump_compatible: boolean
309
- has_occupancy_detection: boolean
310
- supports_demand_response: boolean
311
- has_humidity_sensor: boolean
312
- has_temperature_sensor: boolean
313
- supports_emergency_heating_mode: boolean
314
- }
315
- software_features: {
316
- can_program_climate_schedules: boolean
317
- }
318
- can_hvac_heat?: true | undefined
319
- can_hvac_cool?: true | undefined
320
- can_hvac_heat_cool?: true | undefined
321
- can_turn_off_hvac?: true | undefined
322
- }
323
- | {
324
- main_category: 'relay'
325
- }
326
- | {
327
- main_category: 'intercom'
328
- physical_properties: {
329
- has_camera: boolean
330
- has_rfid_reader?: boolean
331
- has_nfc_reader?: boolean
332
- has_wiegand_interface?: boolean
333
- }
334
- software_features: {
335
- can_remotely_unlock: boolean
336
- can_program_access_codes: boolean
337
- can_unlock_with_face_recognition?: boolean
338
- supports_onvif?: boolean
339
- }
340
- }
341
- | {
342
- main_category: 'accessory'
343
- }
344
- )
345
- >
346
- }
347
- }
348
- '/v1/manufacturers/get': {
349
- route: '/v1/manufacturers/get'
350
- method: 'GET' | 'OPTIONS'
351
- queryParams: {
352
- manufacturer_id: string
353
- }
354
- jsonBody: {}
355
- commonParams: {}
356
- formData: {}
357
- jsonResponse: {
358
- manufacturer: {
359
- manufacturer_id: string
360
- display_name: string
361
- logo?:
362
- | {
363
- url: string
364
- width: number
365
- height: number
366
- }
367
- | undefined
368
- integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
369
- integration_support_level:
370
- 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
371
- is_connect_webview_supported: boolean
372
- requires_seam_support_to_add_account: boolean
373
- device_model_count: number
374
- annotations: Array<{
375
- annotation_code: 'subscription_required'
376
- message: string
377
- }>
378
- website?: string | undefined
379
- legal_name?: string | undefined
380
- parent_organization?: string | undefined
381
- headquarters?: string[] | undefined
382
- countries_of_origin?: string[] | undefined
383
- founding_year?: string | undefined
384
- us_customer_support_tel?: string | undefined
385
- us_customer_support_email?: string | undefined
386
- us_customer_support_contact_url?: string | undefined
387
- seam_api_guide?: string | undefined
388
- description?: string | undefined
389
- }
390
- }
391
- }
392
- '/v1/manufacturers/list': {
393
- route: '/v1/manufacturers/list'
394
- method: 'GET' | 'OPTIONS'
395
- queryParams: {
396
- integration_status?:
397
- ('stable' | 'beta' | 'planned' | 'unsupported' | 'inquire') | undefined
398
- integration_support_levels?:
399
- | Array<'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'>
400
- | undefined
401
- liqe_query?: string | undefined
402
- }
403
- jsonBody: {}
404
- commonParams: {}
405
- formData: {}
406
- jsonResponse: {
407
- manufacturers: Array<{
408
- manufacturer_id: string
409
- display_name: string
410
- logo?:
411
- | {
412
- url: string
413
- width: number
414
- height: number
415
- }
416
- | undefined
417
- integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
418
- integration_support_level:
419
- 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'
420
- is_connect_webview_supported: boolean
421
- requires_seam_support_to_add_account: boolean
422
- device_model_count: number
423
- annotations: Array<{
424
- annotation_code: 'subscription_required'
425
- message: string
426
- }>
427
- website?: string | undefined
428
- legal_name?: string | undefined
429
- parent_organization?: string | undefined
430
- headquarters?: string[] | undefined
431
- countries_of_origin?: string[] | undefined
432
- founding_year?: string | undefined
433
- us_customer_support_tel?: string | undefined
434
- us_customer_support_email?: string | undefined
435
- us_customer_support_contact_url?: string | undefined
436
- seam_api_guide?: string | undefined
437
- description?: string | undefined
438
- }>
439
- }
440
- }
441
- }
442
-
443
- export type RouteResponse<Path extends keyof Routes> =
444
- Routes[Path]['jsonResponse']
445
-
446
- export type RouteRequestBody<Path extends keyof Routes> =
447
- Routes[Path]['jsonBody'] & Routes[Path]['commonParams']
448
-
449
- export type RouteRequestParams<Path extends keyof Routes> =
450
- Routes[Path]['queryParams'] & Routes[Path]['commonParams']