@seamapi/types 1.104.0 → 1.105.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/dist/devicedb.cjs +20 -1
- package/dist/devicedb.cjs.map +1 -1
- package/dist/devicedb.d.cts +149 -1
- package/lib/seam/devicedb/public-models/device-capability.d.ts +21 -0
- package/lib/seam/devicedb/public-models/device-capability.js +15 -0
- package/lib/seam/devicedb/public-models/device-capability.js.map +1 -0
- package/lib/seam/devicedb/public-models/device-model-v1.d.ts +38 -0
- package/lib/seam/devicedb/public-models/device-model-v1.js +10 -2
- package/lib/seam/devicedb/public-models/device-model-v1.js.map +1 -1
- package/lib/seam/devicedb/public-models/hardware.d.ts +8 -0
- package/lib/seam/devicedb/public-models/hardware.js +7 -0
- package/lib/seam/devicedb/public-models/hardware.js.map +1 -0
- package/lib/seam/devicedb/public-models/index.d.ts +1 -0
- package/lib/seam/devicedb/public-models/index.js +1 -0
- package/lib/seam/devicedb/public-models/index.js.map +1 -1
- package/lib/seam/devicedb/route-specs.d.ts +88 -0
- package/lib/seam/devicedb/route-types.d.ts +10 -0
- package/package.json +1 -1
- package/src/lib/seam/devicedb/public-models/device-capability.ts +20 -0
- package/src/lib/seam/devicedb/public-models/device-model-v1.ts +33 -23
- package/src/lib/seam/devicedb/public-models/hardware.ts +7 -0
- package/src/lib/seam/devicedb/public-models/index.ts +1 -0
- package/src/lib/seam/devicedb/route-types.ts +10 -0
|
@@ -98,6 +98,8 @@ export declare const device_model_category_specific_properties: z.ZodDiscriminat
|
|
|
98
98
|
can_program_access_schedules: boolean;
|
|
99
99
|
can_program_access_codes_offline: boolean;
|
|
100
100
|
}>;
|
|
101
|
+
can_remotely_unlock: z.ZodOptional<z.ZodLiteral<true>>;
|
|
102
|
+
can_program_online_access_codes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
101
103
|
}, "strip", z.ZodTypeAny, {
|
|
102
104
|
main_category: "smartlock";
|
|
103
105
|
physical_properties: {
|
|
@@ -111,6 +113,8 @@ export declare const device_model_category_specific_properties: z.ZodDiscriminat
|
|
|
111
113
|
can_program_access_schedules: boolean;
|
|
112
114
|
can_program_access_codes_offline: boolean;
|
|
113
115
|
};
|
|
116
|
+
can_remotely_unlock?: true | undefined;
|
|
117
|
+
can_program_online_access_codes?: true | undefined;
|
|
114
118
|
}, {
|
|
115
119
|
main_category: "smartlock";
|
|
116
120
|
physical_properties: {
|
|
@@ -124,6 +128,8 @@ export declare const device_model_category_specific_properties: z.ZodDiscriminat
|
|
|
124
128
|
can_program_access_schedules: boolean;
|
|
125
129
|
can_program_access_codes_offline: boolean;
|
|
126
130
|
};
|
|
131
|
+
can_remotely_unlock?: true | undefined;
|
|
132
|
+
can_program_online_access_codes?: true | undefined;
|
|
127
133
|
}>, z.ZodObject<{
|
|
128
134
|
main_category: z.ZodLiteral<"sensor">;
|
|
129
135
|
physical_properties: z.ZodObject<{
|
|
@@ -366,6 +372,13 @@ export declare const base_device_model_v1: z.ZodObject<{
|
|
|
366
372
|
description: z.ZodString;
|
|
367
373
|
product_url: z.ZodOptional<z.ZodString>;
|
|
368
374
|
main_connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
|
|
375
|
+
hardware: z.ZodObject<{
|
|
376
|
+
has_physical_key: z.ZodOptional<z.ZodBoolean>;
|
|
377
|
+
}, "strip", z.ZodTypeAny, {
|
|
378
|
+
has_physical_key?: boolean | undefined;
|
|
379
|
+
}, {
|
|
380
|
+
has_physical_key?: boolean | undefined;
|
|
381
|
+
}>;
|
|
369
382
|
aesthetic_variants: z.ZodArray<z.ZodObject<{
|
|
370
383
|
slug: z.ZodString;
|
|
371
384
|
display_name: z.ZodString;
|
|
@@ -475,6 +488,9 @@ export declare const base_device_model_v1: z.ZodObject<{
|
|
|
475
488
|
};
|
|
476
489
|
is_device_supported: boolean;
|
|
477
490
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
491
|
+
hardware: {
|
|
492
|
+
has_physical_key?: boolean | undefined;
|
|
493
|
+
};
|
|
478
494
|
aesthetic_variants: {
|
|
479
495
|
display_name: string;
|
|
480
496
|
slug: string;
|
|
@@ -521,6 +537,9 @@ export declare const base_device_model_v1: z.ZodObject<{
|
|
|
521
537
|
};
|
|
522
538
|
is_device_supported: boolean;
|
|
523
539
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
540
|
+
hardware: {
|
|
541
|
+
has_physical_key?: boolean | undefined;
|
|
542
|
+
};
|
|
524
543
|
aesthetic_variants: {
|
|
525
544
|
display_name: string;
|
|
526
545
|
slug: string;
|
|
@@ -617,6 +636,13 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
617
636
|
description: z.ZodString;
|
|
618
637
|
product_url: z.ZodOptional<z.ZodString>;
|
|
619
638
|
main_connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
|
|
639
|
+
hardware: z.ZodObject<{
|
|
640
|
+
has_physical_key: z.ZodOptional<z.ZodBoolean>;
|
|
641
|
+
}, "strip", z.ZodTypeAny, {
|
|
642
|
+
has_physical_key?: boolean | undefined;
|
|
643
|
+
}, {
|
|
644
|
+
has_physical_key?: boolean | undefined;
|
|
645
|
+
}>;
|
|
620
646
|
aesthetic_variants: z.ZodArray<z.ZodObject<{
|
|
621
647
|
slug: z.ZodString;
|
|
622
648
|
display_name: z.ZodString;
|
|
@@ -726,6 +752,9 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
726
752
|
};
|
|
727
753
|
is_device_supported: boolean;
|
|
728
754
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
755
|
+
hardware: {
|
|
756
|
+
has_physical_key?: boolean | undefined;
|
|
757
|
+
};
|
|
729
758
|
aesthetic_variants: {
|
|
730
759
|
display_name: string;
|
|
731
760
|
slug: string;
|
|
@@ -772,6 +801,9 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
772
801
|
};
|
|
773
802
|
is_device_supported: boolean;
|
|
774
803
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
804
|
+
hardware: {
|
|
805
|
+
has_physical_key?: boolean | undefined;
|
|
806
|
+
};
|
|
775
807
|
aesthetic_variants: {
|
|
776
808
|
display_name: string;
|
|
777
809
|
slug: string;
|
|
@@ -826,6 +858,8 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
826
858
|
can_program_access_schedules: boolean;
|
|
827
859
|
can_program_access_codes_offline: boolean;
|
|
828
860
|
}>;
|
|
861
|
+
can_remotely_unlock: z.ZodOptional<z.ZodLiteral<true>>;
|
|
862
|
+
can_program_online_access_codes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
829
863
|
}, "strip", z.ZodTypeAny, {
|
|
830
864
|
main_category: "smartlock";
|
|
831
865
|
physical_properties: {
|
|
@@ -839,6 +873,8 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
839
873
|
can_program_access_schedules: boolean;
|
|
840
874
|
can_program_access_codes_offline: boolean;
|
|
841
875
|
};
|
|
876
|
+
can_remotely_unlock?: true | undefined;
|
|
877
|
+
can_program_online_access_codes?: true | undefined;
|
|
842
878
|
}, {
|
|
843
879
|
main_category: "smartlock";
|
|
844
880
|
physical_properties: {
|
|
@@ -852,6 +888,8 @@ export declare const device_model_v1: z.ZodIntersection<z.ZodObject<{
|
|
|
852
888
|
can_program_access_schedules: boolean;
|
|
853
889
|
can_program_access_codes_offline: boolean;
|
|
854
890
|
};
|
|
891
|
+
can_remotely_unlock?: true | undefined;
|
|
892
|
+
can_program_online_access_codes?: true | undefined;
|
|
855
893
|
}>, z.ZodObject<{
|
|
856
894
|
main_category: z.ZodLiteral<"sensor">;
|
|
857
895
|
physical_properties: z.ZodObject<{
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { device_model_capability_flags } from './device-capability.js';
|
|
3
|
+
import { hardware } from './hardware.js';
|
|
2
4
|
import { image_reference } from './image-reference.js';
|
|
3
5
|
import { manufacturer } from './manufacturer.js';
|
|
4
6
|
export const device_category = z.enum([
|
|
@@ -15,7 +17,8 @@ export const device_connection_type = z.enum([
|
|
|
15
17
|
'zigbee',
|
|
16
18
|
'unknown',
|
|
17
19
|
]);
|
|
18
|
-
const smartlock = z
|
|
20
|
+
const smartlock = z
|
|
21
|
+
.object({
|
|
19
22
|
main_category: z.literal(device_category.enum.smartlock),
|
|
20
23
|
physical_properties: z.object({
|
|
21
24
|
lock_type: z.enum([
|
|
@@ -37,7 +40,11 @@ const smartlock = z.object({
|
|
|
37
40
|
can_program_access_schedules: z.boolean(),
|
|
38
41
|
can_program_access_codes_offline: z.boolean(),
|
|
39
42
|
}),
|
|
40
|
-
})
|
|
43
|
+
})
|
|
44
|
+
.merge(device_model_capability_flags.pick({
|
|
45
|
+
can_remotely_unlock: true,
|
|
46
|
+
can_program_online_access_codes: true,
|
|
47
|
+
}));
|
|
41
48
|
const sensor = z.object({
|
|
42
49
|
main_category: z.literal(device_category.enum.sensor),
|
|
43
50
|
physical_properties: z.object({
|
|
@@ -94,6 +101,7 @@ export const base_device_model_v1 = z.object({
|
|
|
94
101
|
description: z.string(),
|
|
95
102
|
product_url: z.string().optional(),
|
|
96
103
|
main_connection_type: device_connection_type,
|
|
104
|
+
hardware,
|
|
97
105
|
aesthetic_variants: z
|
|
98
106
|
.object({
|
|
99
107
|
slug: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-model-v1.js","sourceRoot":"","sources":["../../../../src/lib/seam/devicedb/public-models/device-model-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,UAAU;IACV,WAAW;CACZ,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;CACV,CAAC,CAAA;AAIF,MAAM,SAAS,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"device-model-v1.js","sourceRoot":"","sources":["../../../../src/lib/seam/devicedb/public-models/device-model-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,UAAU;IACV,WAAW;CACZ,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;CACV,CAAC,CAAA;AAIF,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC;IACxD,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC;QAC5B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC;YAChB,UAAU;YACV,OAAO;YACP,SAAS;YACT,SAAS;YACT,UAAU;YACV,SAAS;YACT,QAAQ;YACR,SAAS;SACV,CAAC;QACF,gBAAgB,EAAE,CAAC,CAAC,OA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D,KAAK,EAAE;CACX,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAC,GAAG,CACrD,yCAAyC,CAC1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardware.js","sourceRoot":"","sources":["../../../../src/lib/seam/devicedb/public-models/hardware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;CAC9B,CAAC;KACD,OAAO,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/devicedb/public-models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/devicedb/public-models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
|
|
@@ -82,6 +82,13 @@ export declare const routes: {
|
|
|
82
82
|
description: z.ZodString;
|
|
83
83
|
product_url: z.ZodOptional<z.ZodString>;
|
|
84
84
|
main_connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
|
|
85
|
+
hardware: z.ZodObject<{
|
|
86
|
+
has_physical_key: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
has_physical_key?: boolean | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
has_physical_key?: boolean | undefined;
|
|
91
|
+
}>;
|
|
85
92
|
aesthetic_variants: z.ZodArray<z.ZodObject<{
|
|
86
93
|
slug: z.ZodString;
|
|
87
94
|
display_name: z.ZodString;
|
|
@@ -191,6 +198,9 @@ export declare const routes: {
|
|
|
191
198
|
};
|
|
192
199
|
is_device_supported: boolean;
|
|
193
200
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
201
|
+
hardware: {
|
|
202
|
+
has_physical_key?: boolean | undefined;
|
|
203
|
+
};
|
|
194
204
|
aesthetic_variants: {
|
|
195
205
|
display_name: string;
|
|
196
206
|
slug: string;
|
|
@@ -237,6 +247,9 @@ export declare const routes: {
|
|
|
237
247
|
};
|
|
238
248
|
is_device_supported: boolean;
|
|
239
249
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
250
|
+
hardware: {
|
|
251
|
+
has_physical_key?: boolean | undefined;
|
|
252
|
+
};
|
|
240
253
|
aesthetic_variants: {
|
|
241
254
|
display_name: string;
|
|
242
255
|
slug: string;
|
|
@@ -291,6 +304,8 @@ export declare const routes: {
|
|
|
291
304
|
can_program_access_schedules: boolean;
|
|
292
305
|
can_program_access_codes_offline: boolean;
|
|
293
306
|
}>;
|
|
307
|
+
can_remotely_unlock: z.ZodOptional<z.ZodLiteral<true>>;
|
|
308
|
+
can_program_online_access_codes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
294
309
|
}, "strip", z.ZodTypeAny, {
|
|
295
310
|
main_category: "smartlock";
|
|
296
311
|
physical_properties: {
|
|
@@ -304,6 +319,8 @@ export declare const routes: {
|
|
|
304
319
|
can_program_access_schedules: boolean;
|
|
305
320
|
can_program_access_codes_offline: boolean;
|
|
306
321
|
};
|
|
322
|
+
can_remotely_unlock?: true | undefined;
|
|
323
|
+
can_program_online_access_codes?: true | undefined;
|
|
307
324
|
}, {
|
|
308
325
|
main_category: "smartlock";
|
|
309
326
|
physical_properties: {
|
|
@@ -317,6 +334,8 @@ export declare const routes: {
|
|
|
317
334
|
can_program_access_schedules: boolean;
|
|
318
335
|
can_program_access_codes_offline: boolean;
|
|
319
336
|
};
|
|
337
|
+
can_remotely_unlock?: true | undefined;
|
|
338
|
+
can_program_online_access_codes?: true | undefined;
|
|
320
339
|
}>, z.ZodObject<{
|
|
321
340
|
main_category: z.ZodLiteral<"sensor">;
|
|
322
341
|
physical_properties: z.ZodObject<{
|
|
@@ -512,6 +531,9 @@ export declare const routes: {
|
|
|
512
531
|
};
|
|
513
532
|
is_device_supported: boolean;
|
|
514
533
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
534
|
+
hardware: {
|
|
535
|
+
has_physical_key?: boolean | undefined;
|
|
536
|
+
};
|
|
515
537
|
aesthetic_variants: {
|
|
516
538
|
display_name: string;
|
|
517
539
|
slug: string;
|
|
@@ -548,6 +570,8 @@ export declare const routes: {
|
|
|
548
570
|
can_program_access_schedules: boolean;
|
|
549
571
|
can_program_access_codes_offline: boolean;
|
|
550
572
|
};
|
|
573
|
+
can_remotely_unlock?: true | undefined;
|
|
574
|
+
can_program_online_access_codes?: true | undefined;
|
|
551
575
|
}) | ({
|
|
552
576
|
description: string;
|
|
553
577
|
display_name: string;
|
|
@@ -571,6 +595,9 @@ export declare const routes: {
|
|
|
571
595
|
};
|
|
572
596
|
is_device_supported: boolean;
|
|
573
597
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
598
|
+
hardware: {
|
|
599
|
+
has_physical_key?: boolean | undefined;
|
|
600
|
+
};
|
|
574
601
|
aesthetic_variants: {
|
|
575
602
|
display_name: string;
|
|
576
603
|
slug: string;
|
|
@@ -625,6 +652,9 @@ export declare const routes: {
|
|
|
625
652
|
};
|
|
626
653
|
is_device_supported: boolean;
|
|
627
654
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
655
|
+
hardware: {
|
|
656
|
+
has_physical_key?: boolean | undefined;
|
|
657
|
+
};
|
|
628
658
|
aesthetic_variants: {
|
|
629
659
|
display_name: string;
|
|
630
660
|
slug: string;
|
|
@@ -685,6 +715,9 @@ export declare const routes: {
|
|
|
685
715
|
};
|
|
686
716
|
is_device_supported: boolean;
|
|
687
717
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
718
|
+
hardware: {
|
|
719
|
+
has_physical_key?: boolean | undefined;
|
|
720
|
+
};
|
|
688
721
|
aesthetic_variants: {
|
|
689
722
|
display_name: string;
|
|
690
723
|
slug: string;
|
|
@@ -733,6 +766,9 @@ export declare const routes: {
|
|
|
733
766
|
};
|
|
734
767
|
is_device_supported: boolean;
|
|
735
768
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
769
|
+
hardware: {
|
|
770
|
+
has_physical_key?: boolean | undefined;
|
|
771
|
+
};
|
|
736
772
|
aesthetic_variants: {
|
|
737
773
|
display_name: string;
|
|
738
774
|
slug: string;
|
|
@@ -793,6 +829,9 @@ export declare const routes: {
|
|
|
793
829
|
};
|
|
794
830
|
is_device_supported: boolean;
|
|
795
831
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
832
|
+
hardware: {
|
|
833
|
+
has_physical_key?: boolean | undefined;
|
|
834
|
+
};
|
|
796
835
|
aesthetic_variants: {
|
|
797
836
|
display_name: string;
|
|
798
837
|
slug: string;
|
|
@@ -843,6 +882,9 @@ export declare const routes: {
|
|
|
843
882
|
};
|
|
844
883
|
is_device_supported: boolean;
|
|
845
884
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
885
|
+
hardware: {
|
|
886
|
+
has_physical_key?: boolean | undefined;
|
|
887
|
+
};
|
|
846
888
|
aesthetic_variants: {
|
|
847
889
|
display_name: string;
|
|
848
890
|
slug: string;
|
|
@@ -879,6 +921,8 @@ export declare const routes: {
|
|
|
879
921
|
can_program_access_schedules: boolean;
|
|
880
922
|
can_program_access_codes_offline: boolean;
|
|
881
923
|
};
|
|
924
|
+
can_remotely_unlock?: true | undefined;
|
|
925
|
+
can_program_online_access_codes?: true | undefined;
|
|
882
926
|
}) | ({
|
|
883
927
|
description: string;
|
|
884
928
|
display_name: string;
|
|
@@ -902,6 +946,9 @@ export declare const routes: {
|
|
|
902
946
|
};
|
|
903
947
|
is_device_supported: boolean;
|
|
904
948
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
949
|
+
hardware: {
|
|
950
|
+
has_physical_key?: boolean | undefined;
|
|
951
|
+
};
|
|
905
952
|
aesthetic_variants: {
|
|
906
953
|
display_name: string;
|
|
907
954
|
slug: string;
|
|
@@ -956,6 +1003,9 @@ export declare const routes: {
|
|
|
956
1003
|
};
|
|
957
1004
|
is_device_supported: boolean;
|
|
958
1005
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1006
|
+
hardware: {
|
|
1007
|
+
has_physical_key?: boolean | undefined;
|
|
1008
|
+
};
|
|
959
1009
|
aesthetic_variants: {
|
|
960
1010
|
display_name: string;
|
|
961
1011
|
slug: string;
|
|
@@ -1016,6 +1066,9 @@ export declare const routes: {
|
|
|
1016
1066
|
};
|
|
1017
1067
|
is_device_supported: boolean;
|
|
1018
1068
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1069
|
+
hardware: {
|
|
1070
|
+
has_physical_key?: boolean | undefined;
|
|
1071
|
+
};
|
|
1019
1072
|
aesthetic_variants: {
|
|
1020
1073
|
display_name: string;
|
|
1021
1074
|
slug: string;
|
|
@@ -1064,6 +1117,9 @@ export declare const routes: {
|
|
|
1064
1117
|
};
|
|
1065
1118
|
is_device_supported: boolean;
|
|
1066
1119
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1120
|
+
hardware: {
|
|
1121
|
+
has_physical_key?: boolean | undefined;
|
|
1122
|
+
};
|
|
1067
1123
|
aesthetic_variants: {
|
|
1068
1124
|
display_name: string;
|
|
1069
1125
|
slug: string;
|
|
@@ -1124,6 +1180,9 @@ export declare const routes: {
|
|
|
1124
1180
|
};
|
|
1125
1181
|
is_device_supported: boolean;
|
|
1126
1182
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1183
|
+
hardware: {
|
|
1184
|
+
has_physical_key?: boolean | undefined;
|
|
1185
|
+
};
|
|
1127
1186
|
aesthetic_variants: {
|
|
1128
1187
|
display_name: string;
|
|
1129
1188
|
slug: string;
|
|
@@ -1256,6 +1315,13 @@ export declare const routes: {
|
|
|
1256
1315
|
description: z.ZodString;
|
|
1257
1316
|
product_url: z.ZodOptional<z.ZodString>;
|
|
1258
1317
|
main_connection_type: z.ZodEnum<["wifi", "zwave", "zigbee", "unknown"]>;
|
|
1318
|
+
hardware: z.ZodObject<{
|
|
1319
|
+
has_physical_key: z.ZodOptional<z.ZodBoolean>;
|
|
1320
|
+
}, "strip", z.ZodTypeAny, {
|
|
1321
|
+
has_physical_key?: boolean | undefined;
|
|
1322
|
+
}, {
|
|
1323
|
+
has_physical_key?: boolean | undefined;
|
|
1324
|
+
}>;
|
|
1259
1325
|
aesthetic_variants: z.ZodArray<z.ZodObject<{
|
|
1260
1326
|
slug: z.ZodString;
|
|
1261
1327
|
display_name: z.ZodString;
|
|
@@ -1365,6 +1431,9 @@ export declare const routes: {
|
|
|
1365
1431
|
};
|
|
1366
1432
|
is_device_supported: boolean;
|
|
1367
1433
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1434
|
+
hardware: {
|
|
1435
|
+
has_physical_key?: boolean | undefined;
|
|
1436
|
+
};
|
|
1368
1437
|
aesthetic_variants: {
|
|
1369
1438
|
display_name: string;
|
|
1370
1439
|
slug: string;
|
|
@@ -1411,6 +1480,9 @@ export declare const routes: {
|
|
|
1411
1480
|
};
|
|
1412
1481
|
is_device_supported: boolean;
|
|
1413
1482
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1483
|
+
hardware: {
|
|
1484
|
+
has_physical_key?: boolean | undefined;
|
|
1485
|
+
};
|
|
1414
1486
|
aesthetic_variants: {
|
|
1415
1487
|
display_name: string;
|
|
1416
1488
|
slug: string;
|
|
@@ -1465,6 +1537,8 @@ export declare const routes: {
|
|
|
1465
1537
|
can_program_access_schedules: boolean;
|
|
1466
1538
|
can_program_access_codes_offline: boolean;
|
|
1467
1539
|
}>;
|
|
1540
|
+
can_remotely_unlock: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1541
|
+
can_program_online_access_codes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1468
1542
|
}, "strip", z.ZodTypeAny, {
|
|
1469
1543
|
main_category: "smartlock";
|
|
1470
1544
|
physical_properties: {
|
|
@@ -1478,6 +1552,8 @@ export declare const routes: {
|
|
|
1478
1552
|
can_program_access_schedules: boolean;
|
|
1479
1553
|
can_program_access_codes_offline: boolean;
|
|
1480
1554
|
};
|
|
1555
|
+
can_remotely_unlock?: true | undefined;
|
|
1556
|
+
can_program_online_access_codes?: true | undefined;
|
|
1481
1557
|
}, {
|
|
1482
1558
|
main_category: "smartlock";
|
|
1483
1559
|
physical_properties: {
|
|
@@ -1491,6 +1567,8 @@ export declare const routes: {
|
|
|
1491
1567
|
can_program_access_schedules: boolean;
|
|
1492
1568
|
can_program_access_codes_offline: boolean;
|
|
1493
1569
|
};
|
|
1570
|
+
can_remotely_unlock?: true | undefined;
|
|
1571
|
+
can_program_online_access_codes?: true | undefined;
|
|
1494
1572
|
}>, z.ZodObject<{
|
|
1495
1573
|
main_category: z.ZodLiteral<"sensor">;
|
|
1496
1574
|
physical_properties: z.ZodObject<{
|
|
@@ -1686,6 +1764,9 @@ export declare const routes: {
|
|
|
1686
1764
|
};
|
|
1687
1765
|
is_device_supported: boolean;
|
|
1688
1766
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1767
|
+
hardware: {
|
|
1768
|
+
has_physical_key?: boolean | undefined;
|
|
1769
|
+
};
|
|
1689
1770
|
aesthetic_variants: {
|
|
1690
1771
|
display_name: string;
|
|
1691
1772
|
slug: string;
|
|
@@ -1722,6 +1803,8 @@ export declare const routes: {
|
|
|
1722
1803
|
can_program_access_schedules: boolean;
|
|
1723
1804
|
can_program_access_codes_offline: boolean;
|
|
1724
1805
|
};
|
|
1806
|
+
can_remotely_unlock?: true | undefined;
|
|
1807
|
+
can_program_online_access_codes?: true | undefined;
|
|
1725
1808
|
} | {
|
|
1726
1809
|
main_category: "sensor";
|
|
1727
1810
|
physical_properties: {
|
|
@@ -1787,6 +1870,9 @@ export declare const routes: {
|
|
|
1787
1870
|
};
|
|
1788
1871
|
is_device_supported: boolean;
|
|
1789
1872
|
main_connection_type: "unknown" | "wifi" | "zwave" | "zigbee";
|
|
1873
|
+
hardware: {
|
|
1874
|
+
has_physical_key?: boolean | undefined;
|
|
1875
|
+
};
|
|
1790
1876
|
aesthetic_variants: {
|
|
1791
1877
|
display_name: string;
|
|
1792
1878
|
slug: string;
|
|
@@ -1823,6 +1909,8 @@ export declare const routes: {
|
|
|
1823
1909
|
can_program_access_schedules: boolean;
|
|
1824
1910
|
can_program_access_codes_offline: boolean;
|
|
1825
1911
|
};
|
|
1912
|
+
can_remotely_unlock?: true | undefined;
|
|
1913
|
+
can_program_online_access_codes?: true | undefined;
|
|
1826
1914
|
} | {
|
|
1827
1915
|
main_category: "sensor";
|
|
1828
1916
|
physical_properties: {
|
|
@@ -33,6 +33,9 @@ export interface Routes {
|
|
|
33
33
|
description: string;
|
|
34
34
|
product_url?: string | undefined;
|
|
35
35
|
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
|
|
36
|
+
hardware: {
|
|
37
|
+
has_physical_key?: boolean | undefined;
|
|
38
|
+
};
|
|
36
39
|
aesthetic_variants: Array<{
|
|
37
40
|
slug: string;
|
|
38
41
|
display_name: string;
|
|
@@ -68,6 +71,8 @@ export interface Routes {
|
|
|
68
71
|
can_program_access_schedules: boolean;
|
|
69
72
|
can_program_access_codes_offline: boolean;
|
|
70
73
|
};
|
|
74
|
+
can_remotely_unlock?: true | undefined;
|
|
75
|
+
can_program_online_access_codes?: true | undefined;
|
|
71
76
|
} | {
|
|
72
77
|
main_category: 'sensor';
|
|
73
78
|
physical_properties: {
|
|
@@ -152,6 +157,9 @@ export interface Routes {
|
|
|
152
157
|
description: string;
|
|
153
158
|
product_url?: string | undefined;
|
|
154
159
|
main_connection_type: 'wifi' | 'zwave' | 'zigbee' | 'unknown';
|
|
160
|
+
hardware: {
|
|
161
|
+
has_physical_key?: boolean | undefined;
|
|
162
|
+
};
|
|
155
163
|
aesthetic_variants: Array<{
|
|
156
164
|
slug: string;
|
|
157
165
|
display_name: string;
|
|
@@ -187,6 +195,8 @@ export interface Routes {
|
|
|
187
195
|
can_program_access_schedules: boolean;
|
|
188
196
|
can_program_access_codes_offline: boolean;
|
|
189
197
|
};
|
|
198
|
+
can_remotely_unlock?: true | undefined;
|
|
199
|
+
can_program_online_access_codes?: true | undefined;
|
|
190
200
|
} | {
|
|
191
201
|
main_category: 'sensor';
|
|
192
202
|
physical_properties: {
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
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_program_online_access_codes: z.boolean(),
|
|
7
|
+
})
|
|
8
|
+
.partial()
|
|
9
|
+
|
|
10
|
+
const device_model_capability_flags_map: Record<
|
|
11
|
+
keyof z.infer<typeof device_capability_flags>,
|
|
12
|
+
ZodLiteral<true>
|
|
13
|
+
> = {
|
|
14
|
+
can_remotely_unlock: z.literal(true),
|
|
15
|
+
can_program_online_access_codes: z.literal(true),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const device_model_capability_flags = z
|
|
19
|
+
.object(device_model_capability_flags_map)
|
|
20
|
+
.partial()
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
import { device_model_capability_flags } from './device-capability.js'
|
|
4
|
+
import { hardware } from './hardware.js'
|
|
3
5
|
import { image_reference } from './image-reference.js'
|
|
4
6
|
import { manufacturer } from './manufacturer.js'
|
|
5
7
|
|
|
@@ -23,29 +25,36 @@ export const device_connection_type = z.enum([
|
|
|
23
25
|
|
|
24
26
|
export type DeviceConnectionType = z.infer<typeof device_connection_type>
|
|
25
27
|
|
|
26
|
-
const smartlock = z
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
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_unlock: true,
|
|
55
|
+
can_program_online_access_codes: true,
|
|
56
|
+
}),
|
|
57
|
+
)
|
|
49
58
|
|
|
50
59
|
const sensor = z.object({
|
|
51
60
|
main_category: z.literal(device_category.enum.sensor),
|
|
@@ -114,6 +123,7 @@ export const base_device_model_v1 = z.object({
|
|
|
114
123
|
description: z.string(),
|
|
115
124
|
product_url: z.string().optional(),
|
|
116
125
|
main_connection_type: device_connection_type,
|
|
126
|
+
hardware,
|
|
117
127
|
aesthetic_variants: z
|
|
118
128
|
.object({
|
|
119
129
|
slug: z.string(),
|