@seamapi/types 1.1004.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.
- package/package.json +4 -11
- package/devicedb.d.ts +0 -1
- package/devicedb.js +0 -2
- package/devicedb.js.map +0 -1
- package/lib/seam/devicedb/index.d.ts +0 -5
- package/lib/seam/devicedb/index.js +0 -5
- package/lib/seam/devicedb/index.js.map +0 -1
- package/lib/seam/devicedb/models/device-capability.d.ts +0 -57
- package/lib/seam/devicedb/models/device-capability.js +0 -27
- package/lib/seam/devicedb/models/device-capability.js.map +0 -1
- package/lib/seam/devicedb/models/device-model.d.ts +0 -1247
- package/lib/seam/devicedb/models/device-model.js +0 -136
- package/lib/seam/devicedb/models/device-model.js.map +0 -1
- package/lib/seam/devicedb/models/hardware.d.ts +0 -8
- package/lib/seam/devicedb/models/hardware.js +0 -7
- package/lib/seam/devicedb/models/hardware.js.map +0 -1
- package/lib/seam/devicedb/models/image-reference.d.ts +0 -15
- package/lib/seam/devicedb/models/image-reference.js +0 -7
- package/lib/seam/devicedb/models/image-reference.js.map +0 -1
- package/lib/seam/devicedb/models/index.d.ts +0 -4
- package/lib/seam/devicedb/models/index.js +0 -5
- package/lib/seam/devicedb/models/index.js.map +0 -1
- package/lib/seam/devicedb/models/manufacturer.d.ts +0 -117
- package/lib/seam/devicedb/models/manufacturer.js +0 -38
- package/lib/seam/devicedb/models/manufacturer.js.map +0 -1
- package/lib/seam/devicedb/route-specs.d.ts +0 -2052
- package/lib/seam/devicedb/route-specs.js +0 -61
- package/lib/seam/devicedb/route-specs.js.map +0 -1
- package/lib/seam/devicedb/route-types.d.ts +0 -364
- package/lib/seam/devicedb/route-types.js +0 -2
- package/lib/seam/devicedb/route-types.js.map +0 -1
- package/src/devicedb.ts +0 -1
- package/src/lib/seam/devicedb/index.ts +0 -16
- package/src/lib/seam/devicedb/models/device-capability.ts +0 -32
- package/src/lib/seam/devicedb/models/device-model.ts +0 -166
- package/src/lib/seam/devicedb/models/hardware.ts +0 -7
- package/src/lib/seam/devicedb/models/image-reference.ts +0 -9
- package/src/lib/seam/devicedb/models/index.ts +0 -4
- package/src/lib/seam/devicedb/models/manufacturer.ts +0 -54
- package/src/lib/seam/devicedb/route-specs.ts +0 -63
- package/src/lib/seam/devicedb/route-types.ts +0 -450
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as schemas from './models/index.js';
|
|
3
|
-
const dot_path = z.string().regex(/^([a-z])[a-z_.]*[a-z]+$/);
|
|
4
|
-
export const routes = {
|
|
5
|
-
'/api/v1/device_models/get': {
|
|
6
|
-
auth: 'publishable_key',
|
|
7
|
-
methods: ['GET', 'OPTIONS'],
|
|
8
|
-
queryParams: z.object({
|
|
9
|
-
device_model_id: z.string().uuid(),
|
|
10
|
-
}),
|
|
11
|
-
jsonResponse: z.object({
|
|
12
|
-
device_model: schemas.device_model_v1,
|
|
13
|
-
}),
|
|
14
|
-
},
|
|
15
|
-
'/api/v1/device_models/list': {
|
|
16
|
-
auth: 'publishable_key',
|
|
17
|
-
methods: ['GET', 'OPTIONS'],
|
|
18
|
-
queryParams: z.object({
|
|
19
|
-
main_category: schemas.device_category.optional(),
|
|
20
|
-
manufacturer_id: z.string().uuid().optional(),
|
|
21
|
-
manufacturer_ids: z.string().uuid().array().optional(),
|
|
22
|
-
/** @deprecated */
|
|
23
|
-
integration_status: schemas.manufacturer.shape.integration.optional(),
|
|
24
|
-
integration_support_levels: z
|
|
25
|
-
.array(schemas.manufacturer_integration_support_level)
|
|
26
|
-
.optional(),
|
|
27
|
-
text_search: z.string().optional(),
|
|
28
|
-
include_if: z.array(dot_path).optional(),
|
|
29
|
-
exclude_if: z.array(dot_path).optional(),
|
|
30
|
-
}),
|
|
31
|
-
jsonResponse: z.object({
|
|
32
|
-
device_models: schemas.device_model_v1.array(),
|
|
33
|
-
}),
|
|
34
|
-
},
|
|
35
|
-
'/api/v1/manufacturers/get': {
|
|
36
|
-
auth: 'publishable_key',
|
|
37
|
-
methods: ['GET', 'OPTIONS'],
|
|
38
|
-
queryParams: z.object({
|
|
39
|
-
manufacturer_id: z.string().uuid(),
|
|
40
|
-
}),
|
|
41
|
-
jsonResponse: z.object({
|
|
42
|
-
manufacturer: schemas.manufacturer,
|
|
43
|
-
}),
|
|
44
|
-
},
|
|
45
|
-
'/api/v1/manufacturers/list': {
|
|
46
|
-
auth: 'publishable_key',
|
|
47
|
-
methods: ['GET', 'OPTIONS'],
|
|
48
|
-
queryParams: z.object({
|
|
49
|
-
/** @deprecated */
|
|
50
|
-
integration_status: schemas.manufacturer.shape.integration.optional(),
|
|
51
|
-
integration_support_levels: z
|
|
52
|
-
.array(schemas.manufacturer_integration_support_level)
|
|
53
|
-
.optional(),
|
|
54
|
-
liqe_query: z.string().optional(),
|
|
55
|
-
}),
|
|
56
|
-
jsonResponse: z.object({
|
|
57
|
-
manufacturers: schemas.manufacturer.array(),
|
|
58
|
-
}),
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=route-specs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route-specs.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/route-specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA;AAE5C,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,2BAA2B,EAAE;QAC3B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;QAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;SACnC,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,YAAY,EAAE,OAAO,CAAC,eAAe;SACtC,CAAC;KACH;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;QAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE;YACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;YAC7C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;YACtD,kBAAkB;YAClB,kBAAkB,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE;YACrE,0BAA0B,EAAE,CAAC;iBAC1B,KAAK,CAAC,OAAO,CAAC,sCAAsC,CAAC;iBACrD,QAAQ,EAAE;YACb,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAClC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;YACxC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;SACzC,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE;SAC/C,CAAC;KACH;IACD,2BAA2B,EAAE;QAC3B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;QAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;SACnC,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAC;KACH;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;QAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,kBAAkB;YAClB,kBAAkB,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE;YACrE,0BAA0B,EAAE,CAAC;iBAC1B,KAAK,CAAC,OAAO,CAAC,sCAAsC,CAAC;iBACrD,QAAQ,EAAE;YACb,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAClC,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE;SAC5C,CAAC;KACH;CACO,CAAA"}
|
|
@@ -1,364 +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
|
-
url: string;
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
} | undefined;
|
|
22
|
-
integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
23
|
-
integration_support_level: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
24
|
-
is_connect_webview_supported: boolean;
|
|
25
|
-
requires_seam_support_to_add_account: boolean;
|
|
26
|
-
annotations: Array<{
|
|
27
|
-
annotation_code: 'subscription_required';
|
|
28
|
-
message: string;
|
|
29
|
-
}>;
|
|
30
|
-
website?: string | undefined;
|
|
31
|
-
legal_name?: string | undefined;
|
|
32
|
-
parent_organization?: string | undefined;
|
|
33
|
-
headquarters?: string[] | undefined;
|
|
34
|
-
countries_of_origin?: string[] | undefined;
|
|
35
|
-
founding_year?: string | undefined;
|
|
36
|
-
us_customer_support_tel?: string | undefined;
|
|
37
|
-
us_customer_support_email?: string | undefined;
|
|
38
|
-
us_customer_support_contact_url?: string | undefined;
|
|
39
|
-
seam_api_guide?: string | undefined;
|
|
40
|
-
description?: string | undefined;
|
|
41
|
-
};
|
|
42
|
-
is_device_supported: boolean;
|
|
43
|
-
display_name: string;
|
|
44
|
-
description: string;
|
|
45
|
-
product_url?: string | undefined;
|
|
46
|
-
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
|
|
47
|
-
hardware: {
|
|
48
|
-
has_physical_key?: boolean | undefined;
|
|
49
|
-
};
|
|
50
|
-
aesthetic_variants: Array<{
|
|
51
|
-
slug: string;
|
|
52
|
-
display_name: string;
|
|
53
|
-
primary_color_hex?: string | undefined;
|
|
54
|
-
manufacturer_sku?: string | undefined;
|
|
55
|
-
front_image?: {
|
|
56
|
-
url: string;
|
|
57
|
-
width: number;
|
|
58
|
-
height: number;
|
|
59
|
-
} | undefined;
|
|
60
|
-
back_image?: {
|
|
61
|
-
url: string;
|
|
62
|
-
width: number;
|
|
63
|
-
height: number;
|
|
64
|
-
} | undefined;
|
|
65
|
-
images: Array<{
|
|
66
|
-
url: string;
|
|
67
|
-
width: number;
|
|
68
|
-
height: number;
|
|
69
|
-
}>;
|
|
70
|
-
}>;
|
|
71
|
-
power_sources: Array<'battery' | 'hardwired' | 'mechanical_harvesting' | 'wireless' | 'ethernet'>;
|
|
72
|
-
} & ({
|
|
73
|
-
main_category: 'smartlock';
|
|
74
|
-
physical_properties: {
|
|
75
|
-
lock_type: 'deadbolt' | 'lever' | 'mortise' | 'lockbox' | 'cylinder' | 'padlock' | 'locker' | 'unknown';
|
|
76
|
-
has_physical_key: boolean;
|
|
77
|
-
has_camera: boolean;
|
|
78
|
-
};
|
|
79
|
-
software_features: {
|
|
80
|
-
can_remotely_unlock: boolean;
|
|
81
|
-
can_program_access_codes: boolean;
|
|
82
|
-
can_program_access_schedules: boolean;
|
|
83
|
-
can_program_access_codes_offline: boolean;
|
|
84
|
-
};
|
|
85
|
-
can_remotely_lock?: true | undefined;
|
|
86
|
-
can_remotely_unlock?: true | undefined;
|
|
87
|
-
can_program_offline_access_codes?: true | undefined;
|
|
88
|
-
can_program_online_access_codes?: true | undefined;
|
|
89
|
-
} | {
|
|
90
|
-
main_category: 'sensor';
|
|
91
|
-
physical_properties: {
|
|
92
|
-
has_noise_sensor: boolean;
|
|
93
|
-
has_humidity_sensor: boolean;
|
|
94
|
-
has_temperature_sensor: boolean;
|
|
95
|
-
has_occupancy_detection: boolean;
|
|
96
|
-
};
|
|
97
|
-
} | {
|
|
98
|
-
main_category: 'thermostat';
|
|
99
|
-
physical_properties: {
|
|
100
|
-
available_modes: Array<'heat' | 'cool' | 'fan' | 'eco'>;
|
|
101
|
-
is_heat_pump_compatible: boolean;
|
|
102
|
-
has_occupancy_detection: boolean;
|
|
103
|
-
supports_demand_response: boolean;
|
|
104
|
-
has_humidity_sensor: boolean;
|
|
105
|
-
has_temperature_sensor: boolean;
|
|
106
|
-
supports_emergency_heating_mode: boolean;
|
|
107
|
-
};
|
|
108
|
-
software_features: {
|
|
109
|
-
can_program_climate_schedules: boolean;
|
|
110
|
-
};
|
|
111
|
-
can_hvac_heat?: true | undefined;
|
|
112
|
-
can_hvac_cool?: true | undefined;
|
|
113
|
-
can_hvac_heat_cool?: true | undefined;
|
|
114
|
-
can_turn_off_hvac?: true | undefined;
|
|
115
|
-
} | {
|
|
116
|
-
main_category: 'relay';
|
|
117
|
-
} | {
|
|
118
|
-
main_category: 'intercom';
|
|
119
|
-
physical_properties: {
|
|
120
|
-
has_camera: boolean;
|
|
121
|
-
has_rfid_reader?: boolean;
|
|
122
|
-
has_nfc_reader?: boolean;
|
|
123
|
-
has_wiegand_interface?: boolean;
|
|
124
|
-
};
|
|
125
|
-
software_features: {
|
|
126
|
-
can_remotely_unlock: boolean;
|
|
127
|
-
can_program_access_codes: boolean;
|
|
128
|
-
can_unlock_with_face_recognition?: boolean;
|
|
129
|
-
supports_onvif?: boolean;
|
|
130
|
-
};
|
|
131
|
-
} | {
|
|
132
|
-
main_category: 'accessory';
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
'/v1/device_models/list': {
|
|
137
|
-
route: '/v1/device_models/list';
|
|
138
|
-
method: 'GET' | 'OPTIONS';
|
|
139
|
-
queryParams: {
|
|
140
|
-
main_category?: ('smartlock' | 'sensor' | 'thermostat' | 'relay' | 'intercom' | 'accessory') | undefined;
|
|
141
|
-
manufacturer_id?: string | undefined;
|
|
142
|
-
manufacturer_ids?: string[] | undefined;
|
|
143
|
-
integration_status?: ('stable' | 'beta' | 'planned' | 'unsupported' | 'inquire') | undefined;
|
|
144
|
-
integration_support_levels?: Array<'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'> | undefined;
|
|
145
|
-
text_search?: string | undefined;
|
|
146
|
-
include_if?: string[] | undefined;
|
|
147
|
-
exclude_if?: string[] | undefined;
|
|
148
|
-
};
|
|
149
|
-
jsonBody: {};
|
|
150
|
-
commonParams: {};
|
|
151
|
-
formData: {};
|
|
152
|
-
jsonResponse: {
|
|
153
|
-
device_models: Array<{
|
|
154
|
-
device_model_id: string;
|
|
155
|
-
manufacturer: {
|
|
156
|
-
manufacturer_id: string;
|
|
157
|
-
display_name: string;
|
|
158
|
-
logo?: {
|
|
159
|
-
url: string;
|
|
160
|
-
width: number;
|
|
161
|
-
height: number;
|
|
162
|
-
} | undefined;
|
|
163
|
-
integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
164
|
-
integration_support_level: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
165
|
-
is_connect_webview_supported: boolean;
|
|
166
|
-
requires_seam_support_to_add_account: boolean;
|
|
167
|
-
annotations: Array<{
|
|
168
|
-
annotation_code: 'subscription_required';
|
|
169
|
-
message: string;
|
|
170
|
-
}>;
|
|
171
|
-
website?: string | undefined;
|
|
172
|
-
legal_name?: string | undefined;
|
|
173
|
-
parent_organization?: string | undefined;
|
|
174
|
-
headquarters?: string[] | undefined;
|
|
175
|
-
countries_of_origin?: string[] | undefined;
|
|
176
|
-
founding_year?: string | undefined;
|
|
177
|
-
us_customer_support_tel?: string | undefined;
|
|
178
|
-
us_customer_support_email?: string | undefined;
|
|
179
|
-
us_customer_support_contact_url?: string | undefined;
|
|
180
|
-
seam_api_guide?: string | undefined;
|
|
181
|
-
description?: string | undefined;
|
|
182
|
-
};
|
|
183
|
-
is_device_supported: boolean;
|
|
184
|
-
display_name: string;
|
|
185
|
-
description: string;
|
|
186
|
-
product_url?: string | undefined;
|
|
187
|
-
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
|
|
188
|
-
hardware: {
|
|
189
|
-
has_physical_key?: boolean | undefined;
|
|
190
|
-
};
|
|
191
|
-
aesthetic_variants: Array<{
|
|
192
|
-
slug: string;
|
|
193
|
-
display_name: string;
|
|
194
|
-
primary_color_hex?: string | undefined;
|
|
195
|
-
manufacturer_sku?: string | undefined;
|
|
196
|
-
front_image?: {
|
|
197
|
-
url: string;
|
|
198
|
-
width: number;
|
|
199
|
-
height: number;
|
|
200
|
-
} | undefined;
|
|
201
|
-
back_image?: {
|
|
202
|
-
url: string;
|
|
203
|
-
width: number;
|
|
204
|
-
height: number;
|
|
205
|
-
} | undefined;
|
|
206
|
-
images: Array<{
|
|
207
|
-
url: string;
|
|
208
|
-
width: number;
|
|
209
|
-
height: number;
|
|
210
|
-
}>;
|
|
211
|
-
}>;
|
|
212
|
-
power_sources: Array<'battery' | 'hardwired' | 'mechanical_harvesting' | 'wireless' | 'ethernet'>;
|
|
213
|
-
} & ({
|
|
214
|
-
main_category: 'smartlock';
|
|
215
|
-
physical_properties: {
|
|
216
|
-
lock_type: 'deadbolt' | 'lever' | 'mortise' | 'lockbox' | 'cylinder' | 'padlock' | 'locker' | 'unknown';
|
|
217
|
-
has_physical_key: boolean;
|
|
218
|
-
has_camera: boolean;
|
|
219
|
-
};
|
|
220
|
-
software_features: {
|
|
221
|
-
can_remotely_unlock: boolean;
|
|
222
|
-
can_program_access_codes: boolean;
|
|
223
|
-
can_program_access_schedules: boolean;
|
|
224
|
-
can_program_access_codes_offline: boolean;
|
|
225
|
-
};
|
|
226
|
-
can_remotely_lock?: true | undefined;
|
|
227
|
-
can_remotely_unlock?: true | undefined;
|
|
228
|
-
can_program_offline_access_codes?: true | undefined;
|
|
229
|
-
can_program_online_access_codes?: true | undefined;
|
|
230
|
-
} | {
|
|
231
|
-
main_category: 'sensor';
|
|
232
|
-
physical_properties: {
|
|
233
|
-
has_noise_sensor: boolean;
|
|
234
|
-
has_humidity_sensor: boolean;
|
|
235
|
-
has_temperature_sensor: boolean;
|
|
236
|
-
has_occupancy_detection: boolean;
|
|
237
|
-
};
|
|
238
|
-
} | {
|
|
239
|
-
main_category: 'thermostat';
|
|
240
|
-
physical_properties: {
|
|
241
|
-
available_modes: Array<'heat' | 'cool' | 'fan' | 'eco'>;
|
|
242
|
-
is_heat_pump_compatible: boolean;
|
|
243
|
-
has_occupancy_detection: boolean;
|
|
244
|
-
supports_demand_response: boolean;
|
|
245
|
-
has_humidity_sensor: boolean;
|
|
246
|
-
has_temperature_sensor: boolean;
|
|
247
|
-
supports_emergency_heating_mode: boolean;
|
|
248
|
-
};
|
|
249
|
-
software_features: {
|
|
250
|
-
can_program_climate_schedules: boolean;
|
|
251
|
-
};
|
|
252
|
-
can_hvac_heat?: true | undefined;
|
|
253
|
-
can_hvac_cool?: true | undefined;
|
|
254
|
-
can_hvac_heat_cool?: true | undefined;
|
|
255
|
-
can_turn_off_hvac?: true | undefined;
|
|
256
|
-
} | {
|
|
257
|
-
main_category: 'relay';
|
|
258
|
-
} | {
|
|
259
|
-
main_category: 'intercom';
|
|
260
|
-
physical_properties: {
|
|
261
|
-
has_camera: boolean;
|
|
262
|
-
has_rfid_reader?: boolean;
|
|
263
|
-
has_nfc_reader?: boolean;
|
|
264
|
-
has_wiegand_interface?: boolean;
|
|
265
|
-
};
|
|
266
|
-
software_features: {
|
|
267
|
-
can_remotely_unlock: boolean;
|
|
268
|
-
can_program_access_codes: boolean;
|
|
269
|
-
can_unlock_with_face_recognition?: boolean;
|
|
270
|
-
supports_onvif?: boolean;
|
|
271
|
-
};
|
|
272
|
-
} | {
|
|
273
|
-
main_category: 'accessory';
|
|
274
|
-
})>;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
'/v1/manufacturers/get': {
|
|
278
|
-
route: '/v1/manufacturers/get';
|
|
279
|
-
method: 'GET' | 'OPTIONS';
|
|
280
|
-
queryParams: {
|
|
281
|
-
manufacturer_id: string;
|
|
282
|
-
};
|
|
283
|
-
jsonBody: {};
|
|
284
|
-
commonParams: {};
|
|
285
|
-
formData: {};
|
|
286
|
-
jsonResponse: {
|
|
287
|
-
manufacturer: {
|
|
288
|
-
manufacturer_id: string;
|
|
289
|
-
display_name: string;
|
|
290
|
-
logo?: {
|
|
291
|
-
url: string;
|
|
292
|
-
width: number;
|
|
293
|
-
height: number;
|
|
294
|
-
} | undefined;
|
|
295
|
-
integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
296
|
-
integration_support_level: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
297
|
-
is_connect_webview_supported: boolean;
|
|
298
|
-
requires_seam_support_to_add_account: boolean;
|
|
299
|
-
device_model_count: number;
|
|
300
|
-
annotations: Array<{
|
|
301
|
-
annotation_code: 'subscription_required';
|
|
302
|
-
message: string;
|
|
303
|
-
}>;
|
|
304
|
-
website?: string | undefined;
|
|
305
|
-
legal_name?: string | undefined;
|
|
306
|
-
parent_organization?: string | undefined;
|
|
307
|
-
headquarters?: string[] | undefined;
|
|
308
|
-
countries_of_origin?: string[] | undefined;
|
|
309
|
-
founding_year?: string | undefined;
|
|
310
|
-
us_customer_support_tel?: string | undefined;
|
|
311
|
-
us_customer_support_email?: string | undefined;
|
|
312
|
-
us_customer_support_contact_url?: string | undefined;
|
|
313
|
-
seam_api_guide?: string | undefined;
|
|
314
|
-
description?: string | undefined;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
|
-
'/v1/manufacturers/list': {
|
|
319
|
-
route: '/v1/manufacturers/list';
|
|
320
|
-
method: 'GET' | 'OPTIONS';
|
|
321
|
-
queryParams: {
|
|
322
|
-
integration_status?: ('stable' | 'beta' | 'planned' | 'unsupported' | 'inquire') | undefined;
|
|
323
|
-
integration_support_levels?: Array<'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire'> | undefined;
|
|
324
|
-
liqe_query?: string | undefined;
|
|
325
|
-
};
|
|
326
|
-
jsonBody: {};
|
|
327
|
-
commonParams: {};
|
|
328
|
-
formData: {};
|
|
329
|
-
jsonResponse: {
|
|
330
|
-
manufacturers: Array<{
|
|
331
|
-
manufacturer_id: string;
|
|
332
|
-
display_name: string;
|
|
333
|
-
logo?: {
|
|
334
|
-
url: string;
|
|
335
|
-
width: number;
|
|
336
|
-
height: number;
|
|
337
|
-
} | undefined;
|
|
338
|
-
integration: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
339
|
-
integration_support_level: 'stable' | 'beta' | 'planned' | 'unsupported' | 'inquire';
|
|
340
|
-
is_connect_webview_supported: boolean;
|
|
341
|
-
requires_seam_support_to_add_account: boolean;
|
|
342
|
-
device_model_count: number;
|
|
343
|
-
annotations: Array<{
|
|
344
|
-
annotation_code: 'subscription_required';
|
|
345
|
-
message: string;
|
|
346
|
-
}>;
|
|
347
|
-
website?: string | undefined;
|
|
348
|
-
legal_name?: string | undefined;
|
|
349
|
-
parent_organization?: string | undefined;
|
|
350
|
-
headquarters?: string[] | undefined;
|
|
351
|
-
countries_of_origin?: string[] | undefined;
|
|
352
|
-
founding_year?: string | undefined;
|
|
353
|
-
us_customer_support_tel?: string | undefined;
|
|
354
|
-
us_customer_support_email?: string | undefined;
|
|
355
|
-
us_customer_support_contact_url?: string | undefined;
|
|
356
|
-
seam_api_guide?: string | undefined;
|
|
357
|
-
description?: string | undefined;
|
|
358
|
-
}>;
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
export type RouteResponse<Path extends keyof Routes> = Routes[Path]['jsonResponse'];
|
|
363
|
-
export type RouteRequestBody<Path extends keyof Routes> = Routes[Path]['jsonBody'] & Routes[Path]['commonParams'];
|
|
364
|
-
export type RouteRequestParams<Path extends keyof Routes> = Routes[Path]['queryParams'] & Routes[Path]['commonParams'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route-types.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/route-types.ts"],"names":[],"mappings":""}
|
package/src/devicedb.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/seam/devicedb/index.js'
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as schemas from './models/index.js'
|
|
2
|
-
|
|
3
|
-
export * from './route-specs.js'
|
|
4
|
-
export * from './route-types.js'
|
|
5
|
-
export { schemas }
|
|
6
|
-
|
|
7
|
-
export type {
|
|
8
|
-
DeviceCategory,
|
|
9
|
-
DeviceConnectionType,
|
|
10
|
-
DeviceModel,
|
|
11
|
-
ImageReference,
|
|
12
|
-
Manufacturer,
|
|
13
|
-
ManufacturerAnnotation,
|
|
14
|
-
ManufacturerAnnotationCode,
|
|
15
|
-
ManufacturerIntegrationSupportLevel,
|
|
16
|
-
} from './models/index.js'
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z, type ZodLiteral } from 'zod'
|
|
2
|
-
|
|
3
|
-
export const device_capability_flags = z
|
|
4
|
-
.object({
|
|
5
|
-
can_remotely_unlock: z.boolean(),
|
|
6
|
-
can_remotely_lock: z.boolean(),
|
|
7
|
-
can_program_offline_access_codes: z.boolean(),
|
|
8
|
-
can_program_online_access_codes: z.boolean(),
|
|
9
|
-
can_hvac_heat: z.boolean(),
|
|
10
|
-
can_hvac_cool: z.boolean(),
|
|
11
|
-
can_hvac_heat_cool: z.boolean(),
|
|
12
|
-
can_turn_off_hvac: z.boolean(),
|
|
13
|
-
})
|
|
14
|
-
.partial()
|
|
15
|
-
|
|
16
|
-
const device_model_capability_flags_map: Record<
|
|
17
|
-
keyof z.infer<typeof device_capability_flags>,
|
|
18
|
-
ZodLiteral<true>
|
|
19
|
-
> = {
|
|
20
|
-
can_remotely_lock: z.literal(true),
|
|
21
|
-
can_remotely_unlock: z.literal(true),
|
|
22
|
-
can_program_offline_access_codes: z.literal(true),
|
|
23
|
-
can_program_online_access_codes: z.literal(true),
|
|
24
|
-
can_hvac_heat: z.literal(true),
|
|
25
|
-
can_hvac_cool: z.literal(true),
|
|
26
|
-
can_hvac_heat_cool: z.literal(true),
|
|
27
|
-
can_turn_off_hvac: z.literal(true),
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const device_model_capability_flags = z
|
|
31
|
-
.object(device_model_capability_flags_map)
|
|
32
|
-
.partial()
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
import { device_model_capability_flags } from './device-capability.js'
|
|
4
|
-
import { hardware } from './hardware.js'
|
|
5
|
-
import { image_reference } from './image-reference.js'
|
|
6
|
-
import { manufacturer } from './manufacturer.js'
|
|
7
|
-
|
|
8
|
-
export const device_category = z.enum([
|
|
9
|
-
'smartlock',
|
|
10
|
-
'sensor',
|
|
11
|
-
'thermostat',
|
|
12
|
-
'relay',
|
|
13
|
-
'intercom',
|
|
14
|
-
'accessory',
|
|
15
|
-
])
|
|
16
|
-
|
|
17
|
-
export type DeviceCategory = z.infer<typeof device_category>
|
|
18
|
-
|
|
19
|
-
export const device_connection_type = z.enum([
|
|
20
|
-
'wifi',
|
|
21
|
-
'zwave',
|
|
22
|
-
'zigbee',
|
|
23
|
-
'unknown',
|
|
24
|
-
])
|
|
25
|
-
|
|
26
|
-
export type DeviceConnectionType = z.infer<typeof device_connection_type>
|
|
27
|
-
|
|
28
|
-
const smartlock = z
|
|
29
|
-
.object({
|
|
30
|
-
main_category: z.literal(device_category.enum.smartlock),
|
|
31
|
-
physical_properties: z.object({
|
|
32
|
-
lock_type: z.enum([
|
|
33
|
-
'deadbolt',
|
|
34
|
-
'lever',
|
|
35
|
-
'mortise',
|
|
36
|
-
'lockbox',
|
|
37
|
-
'cylinder',
|
|
38
|
-
'padlock',
|
|
39
|
-
'locker',
|
|
40
|
-
'unknown',
|
|
41
|
-
]),
|
|
42
|
-
has_physical_key: z.boolean(),
|
|
43
|
-
has_camera: z.boolean(),
|
|
44
|
-
}),
|
|
45
|
-
software_features: z.object({
|
|
46
|
-
can_remotely_unlock: z.boolean(),
|
|
47
|
-
can_program_access_codes: z.boolean(),
|
|
48
|
-
can_program_access_schedules: z.boolean(),
|
|
49
|
-
can_program_access_codes_offline: z.boolean(),
|
|
50
|
-
}),
|
|
51
|
-
})
|
|
52
|
-
.merge(
|
|
53
|
-
device_model_capability_flags.pick({
|
|
54
|
-
can_remotely_lock: true,
|
|
55
|
-
can_remotely_unlock: true,
|
|
56
|
-
can_program_offline_access_codes: true,
|
|
57
|
-
can_program_online_access_codes: true,
|
|
58
|
-
}),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
const sensor = z.object({
|
|
62
|
-
main_category: z.literal(device_category.enum.sensor),
|
|
63
|
-
physical_properties: z.object({
|
|
64
|
-
has_noise_sensor: z.boolean(),
|
|
65
|
-
has_humidity_sensor: z.boolean(),
|
|
66
|
-
has_temperature_sensor: z.boolean(),
|
|
67
|
-
has_occupancy_detection: z.boolean(),
|
|
68
|
-
}),
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
export const thermostat = z
|
|
72
|
-
.object({
|
|
73
|
-
main_category: z.literal(device_category.enum.thermostat),
|
|
74
|
-
physical_properties: z.object({
|
|
75
|
-
available_modes: z.enum(['heat', 'cool', 'fan', 'eco']).array(),
|
|
76
|
-
is_heat_pump_compatible: z.boolean(),
|
|
77
|
-
has_occupancy_detection: z.boolean(),
|
|
78
|
-
supports_demand_response: z.boolean(),
|
|
79
|
-
has_humidity_sensor: z.boolean(),
|
|
80
|
-
has_temperature_sensor: z.boolean(),
|
|
81
|
-
supports_emergency_heating_mode: z.boolean(),
|
|
82
|
-
}),
|
|
83
|
-
software_features: z.object({
|
|
84
|
-
can_program_climate_schedules: z.boolean(),
|
|
85
|
-
}),
|
|
86
|
-
})
|
|
87
|
-
.merge(
|
|
88
|
-
device_model_capability_flags.pick({
|
|
89
|
-
can_hvac_heat: true,
|
|
90
|
-
can_hvac_cool: true,
|
|
91
|
-
can_hvac_heat_cool: true,
|
|
92
|
-
can_turn_off_hvac: true,
|
|
93
|
-
}),
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
export type ThermostatProperties = z.infer<typeof thermostat>
|
|
97
|
-
|
|
98
|
-
const relay = z.object({
|
|
99
|
-
main_category: z.literal(device_category.enum.relay),
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
const intercom = z.object({
|
|
103
|
-
main_category: z.literal(device_category.enum.intercom),
|
|
104
|
-
physical_properties: z.object({
|
|
105
|
-
has_camera: z.boolean(),
|
|
106
|
-
has_rfid_reader: z.boolean().default(false),
|
|
107
|
-
has_nfc_reader: z.boolean().default(false),
|
|
108
|
-
has_wiegand_interface: z.boolean().default(false),
|
|
109
|
-
}),
|
|
110
|
-
software_features: z.object({
|
|
111
|
-
can_remotely_unlock: z.boolean(),
|
|
112
|
-
can_program_access_codes: z.boolean(),
|
|
113
|
-
can_unlock_with_face_recognition: z.boolean().default(false),
|
|
114
|
-
supports_onvif: z.boolean().default(false),
|
|
115
|
-
}),
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
const accessory = z.object({
|
|
119
|
-
main_category: z.literal(device_category.enum.accessory),
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
export const device_model_category_specific_properties = z.discriminatedUnion(
|
|
123
|
-
'main_category',
|
|
124
|
-
[smartlock, sensor, thermostat, relay, intercom, accessory],
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
export const base_device_model_v1 = z.object({
|
|
128
|
-
device_model_id: z.string().uuid(),
|
|
129
|
-
manufacturer: manufacturer.omit({
|
|
130
|
-
device_model_count: true,
|
|
131
|
-
}),
|
|
132
|
-
is_device_supported: z.boolean(),
|
|
133
|
-
display_name: z.string(),
|
|
134
|
-
description: z.string(),
|
|
135
|
-
product_url: z.string().optional(),
|
|
136
|
-
main_connection_type: device_connection_type,
|
|
137
|
-
hardware,
|
|
138
|
-
aesthetic_variants: z
|
|
139
|
-
.object({
|
|
140
|
-
slug: z.string(),
|
|
141
|
-
display_name: z.string(),
|
|
142
|
-
primary_color_hex: z.string().optional(),
|
|
143
|
-
manufacturer_sku: z.string().optional(),
|
|
144
|
-
front_image: image_reference.optional(),
|
|
145
|
-
back_image: image_reference.optional(),
|
|
146
|
-
images: image_reference.array(),
|
|
147
|
-
})
|
|
148
|
-
.array(),
|
|
149
|
-
power_sources: z
|
|
150
|
-
.enum([
|
|
151
|
-
'battery',
|
|
152
|
-
'hardwired',
|
|
153
|
-
'mechanical_harvesting',
|
|
154
|
-
'wireless',
|
|
155
|
-
'ethernet',
|
|
156
|
-
])
|
|
157
|
-
.array(),
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
export type BaseDeviceModel = z.infer<typeof base_device_model_v1>
|
|
161
|
-
|
|
162
|
-
export const device_model_v1 = base_device_model_v1.and(
|
|
163
|
-
device_model_category_specific_properties,
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
export type DeviceModel = z.infer<typeof device_model_v1>
|