Skip to content

Commit 50d7ff4

Browse files
authored
feat: add wyze lock (#126)
1 parent 965a904 commit 50d7ff4

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

src/lib/seam/connect/openapi.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,7 @@ export default {
16851685
'schlage_lock',
16861686
'seam_relay',
16871687
'smartthings_lock',
1688+
'wyze_lock',
16881689
'yale_lock',
16891690
'two_n_intercom',
16901691
'controlbyweb_device',
@@ -1728,6 +1729,7 @@ export default {
17281729
'schlage_lock',
17291730
'seam_relay',
17301731
'smartthings_lock',
1732+
'wyze_lock',
17311733
'yale_lock',
17321734
'two_n_intercom',
17331735
'controlbyweb_device',
@@ -1772,6 +1774,7 @@ export default {
17721774
'schlage',
17731775
'seam',
17741776
'unknown',
1777+
'wyze',
17751778
'yale',
17761779
'minut',
17771780
'two_n',
@@ -2401,6 +2404,7 @@ export default {
24012404
'schlage_lock',
24022405
'seam_relay',
24032406
'smartthings_lock',
2407+
'wyze_lock',
24042408
'yale_lock',
24052409
'two_n_intercom',
24062410
'controlbyweb_device',
@@ -2444,6 +2448,7 @@ export default {
24442448
'schlage_lock',
24452449
'seam_relay',
24462450
'smartthings_lock',
2451+
'wyze_lock',
24472452
'yale_lock',
24482453
'two_n_intercom',
24492454
'controlbyweb_device',
@@ -2488,6 +2493,7 @@ export default {
24882493
'schlage',
24892494
'seam',
24902495
'unknown',
2496+
'wyze',
24912497
'yale',
24922498
'minut',
24932499
'two_n',
@@ -2870,6 +2876,7 @@ export default {
28702876
'schlage_lock',
28712877
'seam_relay',
28722878
'smartthings_lock',
2879+
'wyze_lock',
28732880
'yale_lock',
28742881
'two_n_intercom',
28752882
'controlbyweb_device',
@@ -2913,6 +2920,7 @@ export default {
29132920
'schlage_lock',
29142921
'seam_relay',
29152922
'smartthings_lock',
2923+
'wyze_lock',
29162924
'yale_lock',
29172925
'two_n_intercom',
29182926
'controlbyweb_device',
@@ -2957,6 +2965,7 @@ export default {
29572965
'schlage',
29582966
'seam',
29592967
'unknown',
2968+
'wyze',
29602969
'yale',
29612970
'minut',
29622971
'two_n',
@@ -5017,6 +5026,7 @@ export default {
50175026
'schlage_lock',
50185027
'seam_relay',
50195028
'smartthings_lock',
5029+
'wyze_lock',
50205030
'yale_lock',
50215031
'two_n_intercom',
50225032
'controlbyweb_device',
@@ -5060,6 +5070,7 @@ export default {
50605070
'schlage_lock',
50615071
'seam_relay',
50625072
'smartthings_lock',
5073+
'wyze_lock',
50635074
'yale_lock',
50645075
'two_n_intercom',
50655076
'controlbyweb_device',
@@ -5104,6 +5115,7 @@ export default {
51045115
'schlage',
51055116
'seam',
51065117
'unknown',
5118+
'wyze',
51075119
'yale',
51085120
'minut',
51095121
'two_n',
@@ -6288,6 +6300,7 @@ export default {
62886300
'schlage_lock',
62896301
'seam_relay',
62906302
'smartthings_lock',
6303+
'wyze_lock',
62916304
'yale_lock',
62926305
'two_n_intercom',
62936306
'controlbyweb_device',
@@ -6684,6 +6697,23 @@ export default {
66846697
'site_name',
66856698
],
66866699
},
6700+
wyze_metadata: {
6701+
type: 'object',
6702+
properties: {
6703+
device_id: { type: 'string' },
6704+
device_name: { type: 'string' },
6705+
product_type: { type: 'string' },
6706+
product_model: { type: 'string' },
6707+
device_info_model: { type: 'string' },
6708+
},
6709+
required: [
6710+
'device_id',
6711+
'device_name',
6712+
'product_type',
6713+
'product_model',
6714+
'device_info_model',
6715+
],
6716+
},
66876717
},
66886718
},
66896719
],
@@ -7272,6 +7302,7 @@ export default {
72727302
'schlage_lock',
72737303
'seam_relay',
72747304
'smartthings_lock',
7305+
'wyze_lock',
72757306
'yale_lock',
72767307
'two_n_intercom',
72777308
'controlbyweb_device',

src/lib/seam/connect/route-types.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,7 @@ export interface Routes {
11931193
| 'schlage_lock'
11941194
| 'seam_relay'
11951195
| 'smartthings_lock'
1196+
| 'wyze_lock'
11961197
| 'yale_lock'
11971198
| 'two_n_intercom'
11981199
| 'controlbyweb_device'
@@ -1420,6 +1421,15 @@ export interface Routes {
14201421
site_name: string
14211422
}
14221423
| undefined
1424+
wyze_metadata?:
1425+
| {
1426+
device_id: string
1427+
device_name: string
1428+
product_type: string
1429+
product_model: string
1430+
device_info_model: string
1431+
}
1432+
| undefined
14231433
}) &
14241434
({
14251435
code_constraints?:
@@ -1767,6 +1777,7 @@ export interface Routes {
17671777
| 'schlage_lock'
17681778
| 'seam_relay'
17691779
| 'smartthings_lock'
1780+
| 'wyze_lock'
17701781
| 'yale_lock'
17711782
| 'two_n_intercom'
17721783
| 'controlbyweb_device'
@@ -1799,6 +1810,7 @@ export interface Routes {
17991810
| 'schlage_lock'
18001811
| 'seam_relay'
18011812
| 'smartthings_lock'
1813+
| 'wyze_lock'
18021814
| 'yale_lock'
18031815
| 'two_n_intercom'
18041816
| 'controlbyweb_device'
@@ -1834,6 +1846,7 @@ export interface Routes {
18341846
| 'schlage'
18351847
| 'seam'
18361848
| 'unknown'
1849+
| 'wyze'
18371850
| 'yale'
18381851
| 'minut'
18391852
| 'two_n'
@@ -1873,6 +1886,7 @@ export interface Routes {
18731886
| 'schlage_lock'
18741887
| 'seam_relay'
18751888
| 'smartthings_lock'
1889+
| 'wyze_lock'
18761890
| 'yale_lock'
18771891
| 'two_n_intercom'
18781892
| 'controlbyweb_device'
@@ -2100,6 +2114,15 @@ export interface Routes {
21002114
site_name: string
21012115
}
21022116
| undefined
2117+
wyze_metadata?:
2118+
| {
2119+
device_id: string
2120+
device_name: string
2121+
product_type: string
2122+
product_model: string
2123+
device_info_model: string
2124+
}
2125+
| undefined
21032126
}) &
21042127
({
21052128
code_constraints?:
@@ -2468,6 +2491,7 @@ export interface Routes {
24682491
| 'schlage_lock'
24692492
| 'seam_relay'
24702493
| 'smartthings_lock'
2494+
| 'wyze_lock'
24712495
| 'yale_lock'
24722496
| 'two_n_intercom'
24732497
| 'controlbyweb_device'
@@ -2536,6 +2560,7 @@ export interface Routes {
25362560
| 'schlage_lock'
25372561
| 'seam_relay'
25382562
| 'smartthings_lock'
2563+
| 'wyze_lock'
25392564
| 'yale_lock'
25402565
| 'two_n_intercom'
25412566
| 'controlbyweb_device'
@@ -2568,6 +2593,7 @@ export interface Routes {
25682593
| 'schlage_lock'
25692594
| 'seam_relay'
25702595
| 'smartthings_lock'
2596+
| 'wyze_lock'
25712597
| 'yale_lock'
25722598
| 'two_n_intercom'
25732599
| 'controlbyweb_device'
@@ -2603,6 +2629,7 @@ export interface Routes {
26032629
| 'schlage'
26042630
| 'seam'
26052631
| 'unknown'
2632+
| 'wyze'
26062633
| 'yale'
26072634
| 'minut'
26082635
| 'two_n'
@@ -2642,6 +2669,7 @@ export interface Routes {
26422669
| 'schlage_lock'
26432670
| 'seam_relay'
26442671
| 'smartthings_lock'
2672+
| 'wyze_lock'
26452673
| 'yale_lock'
26462674
| 'two_n_intercom'
26472675
| 'controlbyweb_device'
@@ -2960,6 +2988,7 @@ export interface Routes {
29602988
| 'schlage_lock'
29612989
| 'seam_relay'
29622990
| 'smartthings_lock'
2991+
| 'wyze_lock'
29632992
| 'yale_lock'
29642993
| 'two_n_intercom'
29652994
| 'controlbyweb_device'
@@ -2992,6 +3021,7 @@ export interface Routes {
29923021
| 'schlage_lock'
29933022
| 'seam_relay'
29943023
| 'smartthings_lock'
3024+
| 'wyze_lock'
29953025
| 'yale_lock'
29963026
| 'two_n_intercom'
29973027
| 'controlbyweb_device'
@@ -3027,6 +3057,7 @@ export interface Routes {
30273057
| 'schlage'
30283058
| 'seam'
30293059
| 'unknown'
3060+
| 'wyze'
30303061
| 'yale'
30313062
| 'minut'
30323063
| 'two_n'
@@ -3502,6 +3533,7 @@ export interface Routes {
35023533
| 'schlage_lock'
35033534
| 'seam_relay'
35043535
| 'smartthings_lock'
3536+
| 'wyze_lock'
35053537
| 'yale_lock'
35063538
| 'two_n_intercom'
35073539
| 'controlbyweb_device'
@@ -3729,6 +3761,15 @@ export interface Routes {
37293761
site_name: string
37303762
}
37313763
| undefined
3764+
wyze_metadata?:
3765+
| {
3766+
device_id: string
3767+
device_name: string
3768+
product_type: string
3769+
product_model: string
3770+
device_info_model: string
3771+
}
3772+
| undefined
37323773
}) &
37333774
({
37343775
code_constraints?:
@@ -4106,6 +4147,7 @@ export interface Routes {
41064147
| 'schlage_lock'
41074148
| 'seam_relay'
41084149
| 'smartthings_lock'
4150+
| 'wyze_lock'
41094151
| 'yale_lock'
41104152
| 'two_n_intercom'
41114153
| 'controlbyweb_device'
@@ -4138,6 +4180,7 @@ export interface Routes {
41384180
| 'schlage_lock'
41394181
| 'seam_relay'
41404182
| 'smartthings_lock'
4183+
| 'wyze_lock'
41414184
| 'yale_lock'
41424185
| 'two_n_intercom'
41434186
| 'controlbyweb_device'
@@ -4173,6 +4216,7 @@ export interface Routes {
41734216
| 'schlage'
41744217
| 'seam'
41754218
| 'unknown'
4219+
| 'wyze'
41764220
| 'yale'
41774221
| 'minut'
41784222
| 'two_n'
@@ -4212,6 +4256,7 @@ export interface Routes {
42124256
| 'schlage_lock'
42134257
| 'seam_relay'
42144258
| 'smartthings_lock'
4259+
| 'wyze_lock'
42154260
| 'yale_lock'
42164261
| 'two_n_intercom'
42174262
| 'controlbyweb_device'
@@ -4439,6 +4484,15 @@ export interface Routes {
44394484
site_name: string
44404485
}
44414486
| undefined
4487+
wyze_metadata?:
4488+
| {
4489+
device_id: string
4490+
device_name: string
4491+
product_type: string
4492+
product_model: string
4493+
device_info_model: string
4494+
}
4495+
| undefined
44424496
}) &
44434497
({
44444498
code_constraints?:

src/lib/seam/connect/unstable/models/device-metadata.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,13 @@ export const device_metadata = z
170170
site_id: z.number(),
171171
site_name: z.string(),
172172
}),
173+
174+
wyze_metadata: z.object({
175+
device_id: z.string(),
176+
device_name: z.string(),
177+
product_type: z.string(),
178+
product_model: z.string(),
179+
device_info_model: z.string(),
180+
}),
173181
})
174182
.partial()

src/lib/seam/connect/unstable/models/device-type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const LOCK_DEVICE_TYPE = {
1818
SCHLAGE_LOCK: 'schlage_lock',
1919
SEAM_RELAY: 'seam_relay',
2020
SMARTTHINGS_LOCK: 'smartthings_lock',
21+
WYZE_LOCK: 'wyze_lock',
2122
YALE_LOCK: 'yale_lock',
2223
TWO_N_INTERCOM: 'two_n_intercom',
2324
CONTROLBYWEB_DEVICE: 'controlbyweb_device',

0 commit comments

Comments
 (0)