@seamapi/types 1.16.0 → 1.17.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.
@@ -1 +1,2 @@
1
- export declare const routes: {};
1
+ export * from './public-models.js';
2
+ export type { Routes } from './route-types.js';
@@ -1,2 +1,2 @@
1
- export const routes = {};
1
+ export * from './public-models.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,270 @@
1
+ import { z } from 'zod';
2
+ export declare const device_model_v0: z.ZodObject<{
3
+ main_category: z.ZodString;
4
+ model_name: z.ZodString;
5
+ manufacturer_model_id: z.ZodString;
6
+ connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
7
+ support_level: z.ZodEnum<["live", "beta", "unsupported"]>;
8
+ brand: z.ZodString;
9
+ icon_url: z.ZodString;
10
+ seam_device_model_page_url: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ brand: string;
13
+ main_category: string;
14
+ model_name: string;
15
+ manufacturer_model_id: string;
16
+ connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
17
+ support_level: "beta" | "live" | "unsupported";
18
+ icon_url: string;
19
+ seam_device_model_page_url: string;
20
+ }, {
21
+ brand: string;
22
+ main_category: string;
23
+ model_name: string;
24
+ manufacturer_model_id: string;
25
+ connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
26
+ support_level: "beta" | "live" | "unsupported";
27
+ icon_url: string;
28
+ seam_device_model_page_url: string;
29
+ }>;
30
+ export type DeviceModelV0 = z.infer<typeof device_model_v0>;
31
+ export declare const image_reference: z.ZodObject<{
32
+ url: z.ZodString;
33
+ width: z.ZodNumber;
34
+ height: z.ZodNumber;
35
+ }, "strip", z.ZodTypeAny, {
36
+ height: number;
37
+ width: number;
38
+ url: string;
39
+ }, {
40
+ height: number;
41
+ width: number;
42
+ url: string;
43
+ }>;
44
+ export type ImageReference = z.infer<typeof image_reference>;
45
+ export declare const manufacturer: z.ZodObject<{
46
+ manufacturer_id: z.ZodString;
47
+ display_name: z.ZodString;
48
+ logo: z.ZodOptional<z.ZodObject<{
49
+ url: z.ZodString;
50
+ width: z.ZodNumber;
51
+ height: z.ZodNumber;
52
+ }, "strip", z.ZodTypeAny, {
53
+ height: number;
54
+ width: number;
55
+ url: string;
56
+ }, {
57
+ height: number;
58
+ width: number;
59
+ url: string;
60
+ }>>;
61
+ integration: z.ZodEnum<["stable", "beta", "planned", "unsupported"]>;
62
+ is_connect_webview_supported: z.ZodBoolean;
63
+ requires_seam_support_to_add_account: z.ZodBoolean;
64
+ }, "strip", z.ZodTypeAny, {
65
+ display_name: string;
66
+ manufacturer_id: string;
67
+ integration: "beta" | "stable" | "unsupported" | "planned";
68
+ is_connect_webview_supported: boolean;
69
+ requires_seam_support_to_add_account: boolean;
70
+ logo?: {
71
+ height: number;
72
+ width: number;
73
+ url: string;
74
+ } | undefined;
75
+ }, {
76
+ display_name: string;
77
+ manufacturer_id: string;
78
+ integration: "beta" | "stable" | "unsupported" | "planned";
79
+ is_connect_webview_supported: boolean;
80
+ requires_seam_support_to_add_account: boolean;
81
+ logo?: {
82
+ height: number;
83
+ width: number;
84
+ url: string;
85
+ } | undefined;
86
+ }>;
87
+ export type Manufacturer = z.infer<typeof manufacturer>;
88
+ export declare const device_model_v1: z.ZodObject<{
89
+ device_model_id: z.ZodString;
90
+ manufacturer: z.ZodObject<{
91
+ manufacturer_id: z.ZodString;
92
+ display_name: z.ZodString;
93
+ logo: z.ZodOptional<z.ZodObject<{
94
+ url: z.ZodString;
95
+ width: z.ZodNumber;
96
+ height: z.ZodNumber;
97
+ }, "strip", z.ZodTypeAny, {
98
+ height: number;
99
+ width: number;
100
+ url: string;
101
+ }, {
102
+ height: number;
103
+ width: number;
104
+ url: string;
105
+ }>>;
106
+ integration: z.ZodEnum<["stable", "beta", "planned", "unsupported"]>;
107
+ is_connect_webview_supported: z.ZodBoolean;
108
+ requires_seam_support_to_add_account: z.ZodBoolean;
109
+ }, "strip", z.ZodTypeAny, {
110
+ display_name: string;
111
+ manufacturer_id: string;
112
+ integration: "beta" | "stable" | "unsupported" | "planned";
113
+ is_connect_webview_supported: boolean;
114
+ requires_seam_support_to_add_account: boolean;
115
+ logo?: {
116
+ height: number;
117
+ width: number;
118
+ url: string;
119
+ } | undefined;
120
+ }, {
121
+ display_name: string;
122
+ manufacturer_id: string;
123
+ integration: "beta" | "stable" | "unsupported" | "planned";
124
+ is_connect_webview_supported: boolean;
125
+ requires_seam_support_to_add_account: boolean;
126
+ logo?: {
127
+ height: number;
128
+ width: number;
129
+ url: string;
130
+ } | undefined;
131
+ }>;
132
+ is_device_supported: z.ZodBoolean;
133
+ display_name: z.ZodString;
134
+ product_url: z.ZodString;
135
+ main_connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
136
+ main_category: z.ZodEnum<["smartlock", "thermostat", "noise_sensor"]>;
137
+ aesthetic_variants: z.ZodArray<z.ZodObject<{
138
+ slug: z.ZodString;
139
+ display_name: z.ZodString;
140
+ primary_color_hex: z.ZodOptional<z.ZodString>;
141
+ manufacturer_sku: z.ZodString;
142
+ front_image: z.ZodOptional<z.ZodObject<{
143
+ url: z.ZodString;
144
+ width: z.ZodNumber;
145
+ height: z.ZodNumber;
146
+ }, "strip", z.ZodTypeAny, {
147
+ height: number;
148
+ width: number;
149
+ url: string;
150
+ }, {
151
+ height: number;
152
+ width: number;
153
+ url: string;
154
+ }>>;
155
+ back_image: z.ZodOptional<z.ZodObject<{
156
+ url: z.ZodString;
157
+ width: z.ZodNumber;
158
+ height: z.ZodNumber;
159
+ }, "strip", z.ZodTypeAny, {
160
+ height: number;
161
+ width: number;
162
+ url: string;
163
+ }, {
164
+ height: number;
165
+ width: number;
166
+ url: string;
167
+ }>>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ display_name: string;
170
+ slug: string;
171
+ manufacturer_sku: string;
172
+ primary_color_hex?: string | undefined;
173
+ front_image?: {
174
+ height: number;
175
+ width: number;
176
+ url: string;
177
+ } | undefined;
178
+ back_image?: {
179
+ height: number;
180
+ width: number;
181
+ url: string;
182
+ } | undefined;
183
+ }, {
184
+ display_name: string;
185
+ slug: string;
186
+ manufacturer_sku: string;
187
+ primary_color_hex?: string | undefined;
188
+ front_image?: {
189
+ height: number;
190
+ width: number;
191
+ url: string;
192
+ } | undefined;
193
+ back_image?: {
194
+ height: number;
195
+ width: number;
196
+ url: string;
197
+ } | undefined;
198
+ }>, "many">;
199
+ }, "strip", z.ZodTypeAny, {
200
+ display_name: string;
201
+ manufacturer: {
202
+ display_name: string;
203
+ manufacturer_id: string;
204
+ integration: "beta" | "stable" | "unsupported" | "planned";
205
+ is_connect_webview_supported: boolean;
206
+ requires_seam_support_to_add_account: boolean;
207
+ logo?: {
208
+ height: number;
209
+ width: number;
210
+ url: string;
211
+ } | undefined;
212
+ };
213
+ main_category: "thermostat" | "smartlock" | "noise_sensor";
214
+ device_model_id: string;
215
+ is_device_supported: boolean;
216
+ product_url: string;
217
+ main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
218
+ aesthetic_variants: {
219
+ display_name: string;
220
+ slug: string;
221
+ manufacturer_sku: string;
222
+ primary_color_hex?: string | undefined;
223
+ front_image?: {
224
+ height: number;
225
+ width: number;
226
+ url: string;
227
+ } | undefined;
228
+ back_image?: {
229
+ height: number;
230
+ width: number;
231
+ url: string;
232
+ } | undefined;
233
+ }[];
234
+ }, {
235
+ display_name: string;
236
+ manufacturer: {
237
+ display_name: string;
238
+ manufacturer_id: string;
239
+ integration: "beta" | "stable" | "unsupported" | "planned";
240
+ is_connect_webview_supported: boolean;
241
+ requires_seam_support_to_add_account: boolean;
242
+ logo?: {
243
+ height: number;
244
+ width: number;
245
+ url: string;
246
+ } | undefined;
247
+ };
248
+ main_category: "thermostat" | "smartlock" | "noise_sensor";
249
+ device_model_id: string;
250
+ is_device_supported: boolean;
251
+ product_url: string;
252
+ main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
253
+ aesthetic_variants: {
254
+ display_name: string;
255
+ slug: string;
256
+ manufacturer_sku: string;
257
+ primary_color_hex?: string | undefined;
258
+ front_image?: {
259
+ height: number;
260
+ width: number;
261
+ url: string;
262
+ } | undefined;
263
+ back_image?: {
264
+ height: number;
265
+ width: number;
266
+ url: string;
267
+ } | undefined;
268
+ }[];
269
+ }>;
270
+ export type DeviceModelV1 = z.infer<typeof device_model_v1>;
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ export const device_model_v0 = z.object({
3
+ main_category: z.string(),
4
+ model_name: z.string(),
5
+ manufacturer_model_id: z.string(),
6
+ connection_type: z.enum(['wifi', 'zwave', 'zigbee', 'unknown']),
7
+ support_level: z.enum(['live', 'beta', 'unsupported']),
8
+ brand: z.string(),
9
+ icon_url: z.string(),
10
+ seam_device_model_page_url: z.string(),
11
+ });
12
+ export const image_reference = z.object({
13
+ url: z.string().url(),
14
+ width: z.number(),
15
+ height: z.number(),
16
+ });
17
+ export const manufacturer = z.object({
18
+ manufacturer_id: z.string().uuid(),
19
+ display_name: z.string(),
20
+ logo: image_reference.optional(),
21
+ integration: z.enum(['stable', 'beta', 'planned', 'unsupported']),
22
+ is_connect_webview_supported: z.boolean(),
23
+ requires_seam_support_to_add_account: z.boolean(),
24
+ });
25
+ export const device_model_v1 = z.object({
26
+ device_model_id: z.string().uuid(),
27
+ manufacturer,
28
+ is_device_supported: z.boolean(),
29
+ display_name: z.string(),
30
+ product_url: z.string(),
31
+ main_connection_type: z.enum(['wifi', 'zwave', 'zigbee', 'unknown']),
32
+ main_category: z.enum(['smartlock', 'thermostat', 'noise_sensor']),
33
+ aesthetic_variants: z
34
+ .object({
35
+ slug: z.string(),
36
+ display_name: z.string(),
37
+ primary_color_hex: z.string().optional(),
38
+ manufacturer_sku: z.string(),
39
+ front_image: image_reference.optional(),
40
+ back_image: image_reference.optional(),
41
+ })
42
+ .array(),
43
+ });
44
+ //# sourceMappingURL=public-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-models.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/public-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC/D,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE;CACvC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,eAAe,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACjE,4BAA4B,EAAE,CAAC,CAAC,OAAO,EAAE;IACzC,oCAAoC,EAAE,CAAC,CAAC,OAAO,EAAE;CAClD,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAClC,YAAY;IACZ,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACpE,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IAClE,kBAAkB,EAAE,CAAC;SAClB,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;QACxB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACxC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;QAC5B,WAAW,EAAE,eAAe,CAAC,QAAQ,EAAE;QACvC,UAAU,EAAE,eAAe,CAAC,QAAQ,EAAE;KACvC,CAAC;SACD,KAAK,EAAE;CACX,CAAC,CAAA"}
@@ -0,0 +1,150 @@
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';
23
+ is_connect_webview_supported: boolean;
24
+ requires_seam_support_to_add_account: boolean;
25
+ };
26
+ is_device_supported: boolean;
27
+ display_name: string;
28
+ product_url: string;
29
+ main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
30
+ main_category: 'smartlock' | 'thermostat' | 'noise_sensor';
31
+ aesthetic_variants: Array<{
32
+ slug: string;
33
+ display_name: string;
34
+ primary_color_hex?: string | undefined;
35
+ manufacturer_sku: string;
36
+ front_image?: {
37
+ url: string;
38
+ width: number;
39
+ height: number;
40
+ } | undefined;
41
+ back_image?: {
42
+ url: string;
43
+ width: number;
44
+ height: number;
45
+ } | undefined;
46
+ }>;
47
+ };
48
+ };
49
+ };
50
+ '/v1/device_models/list': {
51
+ route: '/v1/device_models/list';
52
+ method: 'GET' | 'OPTIONS';
53
+ queryParams: {
54
+ main_category?: string | undefined;
55
+ manufacturer_id?: string | undefined;
56
+ integration_status?: ('stable' | 'beta' | 'planned' | 'unsupported') | undefined;
57
+ text_search?: string | undefined;
58
+ };
59
+ jsonBody: {};
60
+ commonParams: {};
61
+ formData: {};
62
+ jsonResponse: {
63
+ device_models: Array<{
64
+ device_model_id: string;
65
+ manufacturer: {
66
+ manufacturer_id: string;
67
+ display_name: string;
68
+ logo?: {
69
+ url: string;
70
+ width: number;
71
+ height: number;
72
+ } | undefined;
73
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported';
74
+ is_connect_webview_supported: boolean;
75
+ requires_seam_support_to_add_account: boolean;
76
+ };
77
+ is_device_supported: boolean;
78
+ display_name: string;
79
+ product_url: string;
80
+ main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
81
+ main_category: 'smartlock' | 'thermostat' | 'noise_sensor';
82
+ aesthetic_variants: Array<{
83
+ slug: string;
84
+ display_name: string;
85
+ primary_color_hex?: string | undefined;
86
+ manufacturer_sku: string;
87
+ front_image?: {
88
+ url: string;
89
+ width: number;
90
+ height: number;
91
+ } | undefined;
92
+ back_image?: {
93
+ url: string;
94
+ width: number;
95
+ height: number;
96
+ } | undefined;
97
+ }>;
98
+ }>;
99
+ };
100
+ };
101
+ '/v1/manufacturers/get': {
102
+ route: '/v1/manufacturers/get';
103
+ method: 'GET' | 'OPTIONS';
104
+ queryParams: {
105
+ manufacturer_id: string;
106
+ };
107
+ jsonBody: {};
108
+ commonParams: {};
109
+ formData: {};
110
+ jsonResponse: {
111
+ manufacturer: {
112
+ manufacturer_id: string;
113
+ display_name: string;
114
+ logo?: {
115
+ url: string;
116
+ width: number;
117
+ height: number;
118
+ } | undefined;
119
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported';
120
+ is_connect_webview_supported: boolean;
121
+ requires_seam_support_to_add_account: boolean;
122
+ };
123
+ };
124
+ };
125
+ '/v1/manufacturers/list': {
126
+ route: '/v1/manufacturers/list';
127
+ method: 'GET' | 'OPTIONS';
128
+ queryParams: {};
129
+ jsonBody: {};
130
+ commonParams: {};
131
+ formData: {};
132
+ jsonResponse: {
133
+ manufacturers: Array<{
134
+ manufacturer_id: string;
135
+ display_name: string;
136
+ logo?: {
137
+ url: string;
138
+ width: number;
139
+ height: number;
140
+ } | undefined;
141
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported';
142
+ is_connect_webview_supported: boolean;
143
+ requires_seam_support_to_add_account: boolean;
144
+ }>;
145
+ };
146
+ };
147
+ }
148
+ export type RouteResponse<Path extends keyof Routes> = Routes[Path]['jsonResponse'];
149
+ export type RouteRequestBody<Path extends keyof Routes> = Routes[Path]['jsonBody'] & Routes[Path]['commonParams'];
150
+ export type RouteRequestParams<Path extends keyof Routes> = Routes[Path]['queryParams'] & Routes[Path]['commonParams'];
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=route-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-types.js","sourceRoot":"","sources":["../../../src/lib/seam/devicedb/route-types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1 +1,2 @@
1
- export const routes = {}
1
+ export * from './public-models.js'
2
+ export type { Routes } from './route-types.js'
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod'
2
+
3
+ export const device_model_v0 = z.object({
4
+ main_category: z.string(),
5
+ model_name: z.string(),
6
+ manufacturer_model_id: z.string(),
7
+ connection_type: z.enum(['wifi', 'zwave', 'zigbee', 'unknown']),
8
+ support_level: z.enum(['live', 'beta', 'unsupported']),
9
+ brand: z.string(),
10
+ icon_url: z.string(),
11
+ seam_device_model_page_url: z.string(),
12
+ })
13
+
14
+ export type DeviceModelV0 = z.infer<typeof device_model_v0>
15
+
16
+ export const image_reference = z.object({
17
+ url: z.string().url(),
18
+ width: z.number(),
19
+ height: z.number(),
20
+ })
21
+
22
+ export type ImageReference = z.infer<typeof image_reference>
23
+
24
+ export const manufacturer = z.object({
25
+ manufacturer_id: z.string().uuid(),
26
+ display_name: z.string(),
27
+ logo: image_reference.optional(),
28
+ integration: z.enum(['stable', 'beta', 'planned', 'unsupported']),
29
+ is_connect_webview_supported: z.boolean(),
30
+ requires_seam_support_to_add_account: z.boolean(),
31
+ })
32
+
33
+ export type Manufacturer = z.infer<typeof manufacturer>
34
+
35
+ export const device_model_v1 = z.object({
36
+ device_model_id: z.string().uuid(),
37
+ manufacturer,
38
+ is_device_supported: z.boolean(),
39
+ display_name: z.string(),
40
+ product_url: z.string(),
41
+ main_connection_type: z.enum(['wifi', 'zwave', 'zigbee', 'unknown']),
42
+ main_category: z.enum(['smartlock', 'thermostat', 'noise_sensor']),
43
+ aesthetic_variants: z
44
+ .object({
45
+ slug: z.string(),
46
+ display_name: z.string(),
47
+ primary_color_hex: z.string().optional(),
48
+ manufacturer_sku: z.string(),
49
+ front_image: image_reference.optional(),
50
+ back_image: image_reference.optional(),
51
+ })
52
+ .array(),
53
+ })
54
+
55
+ export type DeviceModelV1 = z.infer<typeof device_model_v1>
@@ -0,0 +1,174 @@
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'
25
+ is_connect_webview_supported: boolean
26
+ requires_seam_support_to_add_account: boolean
27
+ }
28
+ is_device_supported: boolean
29
+ display_name: string
30
+ product_url: string
31
+ main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
32
+ main_category: 'smartlock' | 'thermostat' | 'noise_sensor'
33
+ aesthetic_variants: Array<{
34
+ slug: string
35
+ display_name: string
36
+ primary_color_hex?: string | undefined
37
+ manufacturer_sku: string
38
+ front_image?:
39
+ | {
40
+ url: string
41
+ width: number
42
+ height: number
43
+ }
44
+ | undefined
45
+ back_image?:
46
+ | {
47
+ url: string
48
+ width: number
49
+ height: number
50
+ }
51
+ | undefined
52
+ }>
53
+ }
54
+ }
55
+ }
56
+ '/v1/device_models/list': {
57
+ route: '/v1/device_models/list'
58
+ method: 'GET' | 'OPTIONS'
59
+ queryParams: {
60
+ main_category?: string | undefined
61
+ manufacturer_id?: string | undefined
62
+ integration_status?:
63
+ | ('stable' | 'beta' | 'planned' | 'unsupported')
64
+ | undefined
65
+ text_search?: string | undefined
66
+ }
67
+ jsonBody: {}
68
+ commonParams: {}
69
+ formData: {}
70
+ jsonResponse: {
71
+ device_models: Array<{
72
+ device_model_id: string
73
+ manufacturer: {
74
+ manufacturer_id: string
75
+ display_name: string
76
+ logo?:
77
+ | {
78
+ url: string
79
+ width: number
80
+ height: number
81
+ }
82
+ | undefined
83
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported'
84
+ is_connect_webview_supported: boolean
85
+ requires_seam_support_to_add_account: boolean
86
+ }
87
+ is_device_supported: boolean
88
+ display_name: string
89
+ product_url: string
90
+ main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown'
91
+ main_category: 'smartlock' | 'thermostat' | 'noise_sensor'
92
+ aesthetic_variants: Array<{
93
+ slug: string
94
+ display_name: string
95
+ primary_color_hex?: string | undefined
96
+ manufacturer_sku: string
97
+ front_image?:
98
+ | {
99
+ url: string
100
+ width: number
101
+ height: number
102
+ }
103
+ | undefined
104
+ back_image?:
105
+ | {
106
+ url: string
107
+ width: number
108
+ height: number
109
+ }
110
+ | undefined
111
+ }>
112
+ }>
113
+ }
114
+ }
115
+ '/v1/manufacturers/get': {
116
+ route: '/v1/manufacturers/get'
117
+ method: 'GET' | 'OPTIONS'
118
+ queryParams: {
119
+ manufacturer_id: string
120
+ }
121
+ jsonBody: {}
122
+ commonParams: {}
123
+ formData: {}
124
+ jsonResponse: {
125
+ manufacturer: {
126
+ manufacturer_id: string
127
+ display_name: string
128
+ logo?:
129
+ | {
130
+ url: string
131
+ width: number
132
+ height: number
133
+ }
134
+ | undefined
135
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported'
136
+ is_connect_webview_supported: boolean
137
+ requires_seam_support_to_add_account: boolean
138
+ }
139
+ }
140
+ }
141
+ '/v1/manufacturers/list': {
142
+ route: '/v1/manufacturers/list'
143
+ method: 'GET' | 'OPTIONS'
144
+ queryParams: {}
145
+ jsonBody: {}
146
+ commonParams: {}
147
+ formData: {}
148
+ jsonResponse: {
149
+ manufacturers: Array<{
150
+ manufacturer_id: string
151
+ display_name: string
152
+ logo?:
153
+ | {
154
+ url: string
155
+ width: number
156
+ height: number
157
+ }
158
+ | undefined
159
+ integration: 'stable' | 'beta' | 'planned' | 'unsupported'
160
+ is_connect_webview_supported: boolean
161
+ requires_seam_support_to_add_account: boolean
162
+ }>
163
+ }
164
+ }
165
+ }
166
+
167
+ export type RouteResponse<Path extends keyof Routes> =
168
+ Routes[Path]['jsonResponse']
169
+
170
+ export type RouteRequestBody<Path extends keyof Routes> =
171
+ Routes[Path]['jsonBody'] & Routes[Path]['commonParams']
172
+
173
+ export type RouteRequestParams<Path extends keyof Routes> =
174
+ Routes[Path]['queryParams'] & Routes[Path]['commonParams']