homey-api 3.0.0-rc.1 → 3.0.0-rc.10

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 (30) hide show
  1. package/assets/specifications/HomeyAPIV3Local.json +269 -5
  2. package/assets/types/homey-api.d.ts +267 -59
  3. package/assets/types/homey-api.private.d.ts +267 -59
  4. package/lib/HomeyAPI/HomeyAPI.js +12 -7
  5. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Capability.js +2 -2
  6. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Device.js +2 -2
  7. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices.js +0 -14
  8. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/Driver.js +2 -2
  9. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/PairSession.js +20 -0
  10. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers.js +17 -0
  11. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/AdvancedFlow.js +16 -3
  12. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/Flow.js +25 -2
  13. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardAction.js +2 -2
  14. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardCondition.js +2 -2
  15. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardTrigger.js +2 -2
  16. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow.js +36 -13
  17. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlowToken/FlowToken.js +3 -3
  18. package/lib/HomeyAPI/HomeyAPIV2/ManagerInsights/Log.js +2 -3
  19. package/lib/HomeyAPI/HomeyAPIV2/ManagerInsights.js +17 -0
  20. package/lib/HomeyAPI/HomeyAPIV3/Item.js +14 -1
  21. package/lib/HomeyAPI/HomeyAPIV3/Manager.js +25 -43
  22. package/lib/HomeyAPI/HomeyAPIV3/ManagerDevices/Device.js +12 -12
  23. package/lib/HomeyAPI/HomeyAPIV3/ManagerDevices/DeviceCapability.js +1 -1
  24. package/lib/HomeyAPI/HomeyAPIV3/ManagerDrivers/PairSession.js +9 -0
  25. package/lib/HomeyAPI/HomeyAPIV3/ManagerDrivers.js +2 -0
  26. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/Flow.js +8 -0
  27. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/FlowCard.js +8 -0
  28. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlowToken/FlowToken.js +4 -1
  29. package/lib/HomeyAPI/HomeyAPIV3/ManagerInsights/Log.js +14 -0
  30. package/package.json +1 -1
@@ -1,5 +1,177 @@
1
1
  {
2
2
  "managers": {
3
+ "ManagerAlarms": {
4
+ "id": "alarms",
5
+ "idCamelCase": "alarms",
6
+ "items": {
7
+ "Alarm": {
8
+ "id": "alarm",
9
+ "schema": {
10
+ "repetition": {
11
+ "type": "object",
12
+ "properties": {
13
+ "required": [
14
+ "monday",
15
+ "tuesday",
16
+ "wednesday",
17
+ "thursday",
18
+ "friday",
19
+ "saturday",
20
+ "sunday"
21
+ ],
22
+ "monday": {
23
+ "type": "boolean"
24
+ },
25
+ "tuesday": {
26
+ "type": "boolean"
27
+ },
28
+ "wednesday": {
29
+ "type": "boolean"
30
+ },
31
+ "thursday": {
32
+ "type": "boolean"
33
+ },
34
+ "friday": {
35
+ "type": "boolean"
36
+ },
37
+ "saturday": {
38
+ "type": "boolean"
39
+ },
40
+ "sunday": {
41
+ "type": "boolean"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "operations": {
49
+ "getAlarms": {
50
+ "method": "get",
51
+ "path": "/alarm",
52
+ "private": false,
53
+ "scopes": [
54
+ "homey.alarm.readonly"
55
+ ],
56
+ "crud": {
57
+ "type": "getAll",
58
+ "item": "Alarm"
59
+ },
60
+ "parameters": {}
61
+ },
62
+ "getAlarm": {
63
+ "method": "get",
64
+ "path": "/alarm/:id",
65
+ "private": false,
66
+ "scopes": [
67
+ "homey.alarm.readonly"
68
+ ],
69
+ "crud": {
70
+ "type": "getOne",
71
+ "item": "Alarm"
72
+ },
73
+ "parameters": {
74
+ "id": {
75
+ "in": "path",
76
+ "type": "string",
77
+ "required": true
78
+ }
79
+ }
80
+ },
81
+ "createAlarm": {
82
+ "method": "post",
83
+ "path": "/alarm",
84
+ "private": false,
85
+ "scopes": [
86
+ "homey.alarm"
87
+ ],
88
+ "crud": {
89
+ "type": "createOne",
90
+ "item": "Alarm"
91
+ },
92
+ "parameters": {
93
+ "alarm": {
94
+ "in": "body",
95
+ "type": "object",
96
+ "root": true,
97
+ "required": true,
98
+ "properties": {
99
+ "name": {
100
+ "type": "string"
101
+ },
102
+ "time": {
103
+ "type": "string"
104
+ },
105
+ "enabled": {
106
+ "type": "boolean"
107
+ },
108
+ "repetition": {
109
+ "type": "object"
110
+ }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "updateAlarm": {
116
+ "method": "put",
117
+ "path": "/alarm/:id",
118
+ "private": false,
119
+ "scopes": [
120
+ "homey.alarm"
121
+ ],
122
+ "crud": {
123
+ "type": "updateOne",
124
+ "item": "Alarm"
125
+ },
126
+ "parameters": {
127
+ "id": {
128
+ "in": "path",
129
+ "type": "string",
130
+ "required": true
131
+ },
132
+ "alarm": {
133
+ "in": "body",
134
+ "type": "object",
135
+ "root": true,
136
+ "required": true,
137
+ "properties": {
138
+ "name": {
139
+ "type": "string"
140
+ },
141
+ "time": {
142
+ "type": "string"
143
+ },
144
+ "enabled": {
145
+ "type": "boolean"
146
+ },
147
+ "repetition": {
148
+ "type": "object"
149
+ }
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "deleteAlarm": {
155
+ "method": "delete",
156
+ "path": "/alarm/:id",
157
+ "private": false,
158
+ "scopes": [
159
+ "homey.alarm"
160
+ ],
161
+ "crud": {
162
+ "type": "deleteOne",
163
+ "item": "Alarm"
164
+ },
165
+ "parameters": {
166
+ "id": {
167
+ "in": "path",
168
+ "type": "string",
169
+ "required": true
170
+ }
171
+ }
172
+ }
173
+ }
174
+ },
3
175
  "ManagerApi": {
4
176
  "id": "api",
5
177
  "idCamelCase": "api",
@@ -1327,8 +1499,7 @@
1327
1499
  "required": true
1328
1500
  },
1329
1501
  "data": {
1330
- "in": "body",
1331
- "type": "object"
1502
+ "in": "body"
1332
1503
  }
1333
1504
  }
1334
1505
  },
@@ -1351,8 +1522,7 @@
1351
1522
  "required": true
1352
1523
  },
1353
1524
  "data": {
1354
- "in": "body",
1355
- "type": "object"
1525
+ "in": "body"
1356
1526
  }
1357
1527
  }
1358
1528
  },
@@ -2310,6 +2480,40 @@
2310
2480
  "item": "FlowToken"
2311
2481
  },
2312
2482
  "parameters": {}
2483
+ },
2484
+ "getFlowToken": {
2485
+ "method": "get",
2486
+ "path": "/flowtoken/:id",
2487
+ "private": false,
2488
+ "scopes": [
2489
+ "homey.flow.readonly"
2490
+ ],
2491
+ "crud": {
2492
+ "type": "getOne",
2493
+ "item": "FlowToken"
2494
+ },
2495
+ "parameters": {
2496
+ "id": {
2497
+ "in": "path",
2498
+ "type": "string",
2499
+ "required": true
2500
+ }
2501
+ }
2502
+ },
2503
+ "getFlowTokenValue": {
2504
+ "method": "get",
2505
+ "path": "/flowtoken/:id/value",
2506
+ "private": false,
2507
+ "scopes": [
2508
+ "homey.flow.readonly"
2509
+ ],
2510
+ "parameters": {
2511
+ "id": {
2512
+ "in": "path",
2513
+ "type": "string",
2514
+ "required": true
2515
+ }
2516
+ }
2313
2517
  }
2314
2518
  }
2315
2519
  },
@@ -3562,6 +3766,21 @@
3562
3766
  "homey.system"
3563
3767
  ],
3564
3768
  "parameters": {}
3769
+ },
3770
+ "setDebug": {
3771
+ "method": "put",
3772
+ "path": "/debug",
3773
+ "private": false,
3774
+ "scopes": [
3775
+ "homey.system"
3776
+ ],
3777
+ "parameters": {
3778
+ "namespace": {
3779
+ "in": "body",
3780
+ "type": "string",
3781
+ "required": true
3782
+ }
3783
+ }
3565
3784
  }
3566
3785
  }
3567
3786
  },
@@ -4262,13 +4481,34 @@
4262
4481
  "method": "get",
4263
4482
  "path": "/zone",
4264
4483
  "private": false,
4265
- "scopes": [],
4484
+ "scopes": [
4485
+ "homey.zone.readonly"
4486
+ ],
4266
4487
  "crud": {
4267
4488
  "type": "getAll",
4268
4489
  "item": "Zone"
4269
4490
  },
4270
4491
  "parameters": {}
4271
4492
  },
4493
+ "getZone": {
4494
+ "method": "get",
4495
+ "path": "/zone/:id",
4496
+ "private": false,
4497
+ "scopes": [
4498
+ "homey.zone.readonly"
4499
+ ],
4500
+ "crud": {
4501
+ "type": "getOne",
4502
+ "item": "Zone"
4503
+ },
4504
+ "parameters": {
4505
+ "id": {
4506
+ "in": "path",
4507
+ "type": "string",
4508
+ "required": true
4509
+ }
4510
+ }
4511
+ },
4272
4512
  "createZone": {
4273
4513
  "method": "post",
4274
4514
  "path": "/zone",
@@ -4401,6 +4641,30 @@
4401
4641
  "homey.system"
4402
4642
  ],
4403
4643
  "parameters": {}
4644
+ },
4645
+ "getLog": {
4646
+ "method": "get",
4647
+ "path": "/log",
4648
+ "private": false,
4649
+ "scopes": [
4650
+ "homey.system"
4651
+ ],
4652
+ "parameters": {}
4653
+ },
4654
+ "setLogEnabled": {
4655
+ "method": "put",
4656
+ "path": "/log",
4657
+ "private": false,
4658
+ "scopes": [
4659
+ "homey.system"
4660
+ ],
4661
+ "parameters": {
4662
+ "enabled": {
4663
+ "in": "body",
4664
+ "type": "boolean",
4665
+ "required": true
4666
+ }
4667
+ }
4404
4668
  }
4405
4669
  }
4406
4670
  }
@@ -279,7 +279,7 @@
279
279
 
280
280
 
281
281
 
282
- debug: function,
282
+ debug: function | null,
283
283
 
284
284
 
285
285
  },
@@ -1063,62 +1063,6 @@
1063
1063
 
1064
1064
 
1065
1065
 
1066
- makeCapabilityInstance(
1067
-
1068
-
1069
-
1070
-
1071
- capabilityId: string,
1072
-
1073
-
1074
-
1075
- listener: {
1076
-
1077
-
1078
- value: number | boolean | string,
1079
-
1080
-
1081
- },
1082
-
1083
-
1084
-
1085
-
1086
- ):
1087
- HomeyAPIV2.ManagerDevices.Device.DeviceCapability;
1088
-
1089
- setCapabilityValue(
1090
-
1091
-
1092
-
1093
-
1094
- opts: {
1095
-
1096
-
1097
- capabilityId: string,
1098
-
1099
-
1100
-
1101
- value: number | boolean | string,
1102
-
1103
-
1104
-
1105
- opts: {
1106
-
1107
-
1108
- duration: number,
1109
-
1110
-
1111
- },
1112
-
1113
-
1114
- },
1115
-
1116
-
1117
-
1118
-
1119
- ):
1120
- Promise<void>;
1121
-
1122
1066
  }
1123
1067
 
1124
1068
  }
@@ -2280,6 +2224,22 @@
2280
2224
 
2281
2225
 
2282
2226
 
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+ export namespace HomeyAPIV3Local.ManagerAlarms {
2233
+
2234
+ export class Alarm {
2235
+
2236
+
2237
+
2238
+
2239
+
2240
+ }
2241
+
2242
+ }
2283
2243
 
2284
2244
 
2285
2245
 
@@ -10337,6 +10297,150 @@
10337
10297
 
10338
10298
 
10339
10299
 
10300
+ isConnected(
10301
+
10302
+ ):
10303
+ Boolean;
10304
+
10305
+ connect(
10306
+
10307
+ ):
10308
+ Promise<void>;
10309
+
10310
+ disconnect(
10311
+
10312
+ ):
10313
+ Promise<void>;
10314
+
10315
+ }
10316
+
10317
+ export class ManagerAlarms extends HomeyAPIV3Local.Manager {
10318
+
10319
+
10320
+
10321
+
10322
+
10323
+ getAlarms(
10324
+
10325
+ ):
10326
+ Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
10327
+
10328
+ getAlarm(
10329
+
10330
+
10331
+
10332
+
10333
+ opts: {
10334
+
10335
+
10336
+ id: string,
10337
+
10338
+
10339
+ },
10340
+
10341
+
10342
+
10343
+
10344
+ ):
10345
+ Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
10346
+
10347
+ createAlarm(
10348
+
10349
+
10350
+
10351
+
10352
+ opts: {
10353
+
10354
+
10355
+ alarm: {
10356
+
10357
+
10358
+ name: string,
10359
+
10360
+
10361
+
10362
+ time: string,
10363
+
10364
+
10365
+
10366
+ enabled: boolean,
10367
+
10368
+
10369
+
10370
+ repetition: object,
10371
+
10372
+
10373
+ },
10374
+
10375
+
10376
+ },
10377
+
10378
+
10379
+
10380
+
10381
+ ):
10382
+ Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
10383
+
10384
+ updateAlarm(
10385
+
10386
+
10387
+
10388
+
10389
+ opts: {
10390
+
10391
+
10392
+ id: string,
10393
+
10394
+
10395
+
10396
+ alarm: {
10397
+
10398
+
10399
+ name: string,
10400
+
10401
+
10402
+
10403
+ time: string,
10404
+
10405
+
10406
+
10407
+ enabled: boolean,
10408
+
10409
+
10410
+
10411
+ repetition: object,
10412
+
10413
+
10414
+ },
10415
+
10416
+
10417
+ },
10418
+
10419
+
10420
+
10421
+
10422
+ ):
10423
+ Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
10424
+
10425
+ deleteAlarm(
10426
+
10427
+
10428
+
10429
+
10430
+ opts: {
10431
+
10432
+
10433
+ id: string,
10434
+
10435
+
10436
+ },
10437
+
10438
+
10439
+
10440
+
10441
+ ):
10442
+ Promise<any>;
10443
+
10340
10444
  isConnected(
10341
10445
 
10342
10446
  ):
@@ -11539,7 +11643,7 @@
11539
11643
 
11540
11644
 
11541
11645
 
11542
- data: object,
11646
+ data: *,
11543
11647
 
11544
11648
 
11545
11649
  },
@@ -11566,7 +11670,7 @@
11566
11670
 
11567
11671
 
11568
11672
 
11569
- data: object,
11673
+ data: *,
11570
11674
 
11571
11675
 
11572
11676
  },
@@ -12474,6 +12578,44 @@
12474
12578
  ):
12475
12579
  Promise<HomeyAPIV3Local.ManagerFlowToken.FlowToken>;
12476
12580
 
12581
+ getFlowToken(
12582
+
12583
+
12584
+
12585
+
12586
+ opts: {
12587
+
12588
+
12589
+ id: string,
12590
+
12591
+
12592
+ },
12593
+
12594
+
12595
+
12596
+
12597
+ ):
12598
+ Promise<HomeyAPIV3Local.ManagerFlowToken.FlowToken>;
12599
+
12600
+ getFlowTokenValue(
12601
+
12602
+
12603
+
12604
+
12605
+ opts: {
12606
+
12607
+
12608
+ id: string,
12609
+
12610
+
12611
+ },
12612
+
12613
+
12614
+
12615
+
12616
+ ):
12617
+ Promise<any>;
12618
+
12477
12619
  isConnected(
12478
12620
 
12479
12621
  ):
@@ -13791,6 +13933,25 @@
13791
13933
 
13792
13934
  rebootOTA(
13793
13935
 
13936
+ ):
13937
+ Promise<any>;
13938
+
13939
+ setDebug(
13940
+
13941
+
13942
+
13943
+
13944
+ opts: {
13945
+
13946
+
13947
+ namespace: string,
13948
+
13949
+
13950
+ },
13951
+
13952
+
13953
+
13954
+
13794
13955
  ):
13795
13956
  Promise<any>;
13796
13957
 
@@ -14396,6 +14557,25 @@
14396
14557
 
14397
14558
  getZones(
14398
14559
 
14560
+ ):
14561
+ Promise<HomeyAPIV3Local.ManagerZones.Zone>;
14562
+
14563
+ getZone(
14564
+
14565
+
14566
+
14567
+
14568
+ opts: {
14569
+
14570
+
14571
+ id: string,
14572
+
14573
+
14574
+ },
14575
+
14576
+
14577
+
14578
+
14399
14579
  ):
14400
14580
  Promise<HomeyAPIV3Local.ManagerZones.Zone>;
14401
14581
 
@@ -14536,6 +14716,30 @@
14536
14716
 
14537
14717
 
14538
14718
 
14719
+ ):
14720
+ Promise<any>;
14721
+
14722
+ getLog(
14723
+
14724
+ ):
14725
+ Promise<any>;
14726
+
14727
+ setLogEnabled(
14728
+
14729
+
14730
+
14731
+
14732
+ opts: {
14733
+
14734
+
14735
+ enabled: boolean,
14736
+
14737
+
14738
+ },
14739
+
14740
+
14741
+
14742
+
14539
14743
  ):
14540
14744
  Promise<any>;
14541
14745
 
@@ -14573,6 +14777,10 @@
14573
14777
 
14574
14778
 
14575
14779
 
14780
+
14781
+
14782
+
14783
+
14576
14784
 
14577
14785
 
14578
14786