homey-api 3.0.0-rc.2 → 3.0.0-rc.20

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 (34) hide show
  1. package/assets/specifications/AthomCloudAPI.json +16 -0
  2. package/assets/specifications/HomeyAPIV3Local.json +365 -7
  3. package/assets/types/homey-api.d.ts +382 -59
  4. package/assets/types/homey-api.private.d.ts +428 -59
  5. package/index.browser.js +1 -0
  6. package/index.js +19 -20
  7. package/lib/HomeyAPI/HomeyAPI.js +58 -5
  8. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Capability.js +2 -2
  9. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Device.js +4 -3
  10. package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices.js +0 -14
  11. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/Driver.js +2 -2
  12. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/PairSession.js +20 -0
  13. package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers.js +17 -0
  14. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/AdvancedFlow.js +19 -4
  15. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/Flow.js +27 -2
  16. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardAction.js +2 -2
  17. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardCondition.js +2 -2
  18. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardTrigger.js +2 -2
  19. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow.js +37 -14
  20. package/lib/HomeyAPI/HomeyAPIV2/ManagerFlowToken/FlowToken.js +3 -3
  21. package/lib/HomeyAPI/HomeyAPIV2/ManagerInsights/Log.js +2 -3
  22. package/lib/HomeyAPI/HomeyAPIV2/ManagerInsights.js +17 -0
  23. package/lib/HomeyAPI/HomeyAPIV3/Item.js +14 -1
  24. package/lib/HomeyAPI/HomeyAPIV3/Manager.js +34 -46
  25. package/lib/HomeyAPI/HomeyAPIV3/ManagerDevices/Device.js +14 -12
  26. package/lib/HomeyAPI/HomeyAPIV3/ManagerDevices/DeviceCapability.js +1 -1
  27. package/lib/HomeyAPI/HomeyAPIV3/ManagerDrivers/PairSession.js +9 -0
  28. package/lib/HomeyAPI/HomeyAPIV3/ManagerDrivers.js +2 -0
  29. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/AdvancedFlow.js +119 -0
  30. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/Flow.js +103 -0
  31. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/FlowCard.js +8 -0
  32. package/lib/HomeyAPI/HomeyAPIV3/ManagerFlowToken/FlowToken.js +12 -4
  33. package/lib/HomeyAPI/HomeyAPIV3/ManagerInsights/Log.js +14 -0
  34. package/package.json +1 -1
@@ -863,6 +863,22 @@
863
863
  }
864
864
  }
865
865
  },
866
+ "activateHomey": {
867
+ "path": "/homey/{id}/activate",
868
+ "method": "post",
869
+ "private": true,
870
+ "parameters": {
871
+ "id": {
872
+ "in": "path",
873
+ "type": "string",
874
+ "required": true
875
+ },
876
+ "userId": {
877
+ "type": "string",
878
+ "in": "body"
879
+ }
880
+ }
881
+ },
866
882
  "addHomeyLicense": {
867
883
  "path": "/homey/{homeyId}/license/{license}",
868
884
  "method": "post",
@@ -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",
@@ -311,6 +483,21 @@
311
483
  "required": true
312
484
  }
313
485
  }
486
+ },
487
+ "getAppUsage": {
488
+ "method": "get",
489
+ "path": "/app/:id/usage",
490
+ "private": false,
491
+ "scopes": [
492
+ "homey.app.readonly"
493
+ ],
494
+ "parameters": {
495
+ "id": {
496
+ "in": "path",
497
+ "type": "string",
498
+ "required": true
499
+ }
500
+ }
314
501
  }
315
502
  }
316
503
  },
@@ -521,6 +708,25 @@
521
708
  "required": true
522
709
  }
523
710
  }
711
+ },
712
+ "setDebugLogging": {
713
+ "method": "put",
714
+ "path": "/debug",
715
+ "private": true,
716
+ "scopes": [
717
+ "homey.system"
718
+ ],
719
+ "parameters": {
720
+ "peripheral": {
721
+ "in": "body",
722
+ "type": "string"
723
+ },
724
+ "enabled": {
725
+ "in": "body",
726
+ "type": "boolean",
727
+ "required": true
728
+ }
729
+ }
524
730
  }
525
731
  }
526
732
  },
@@ -1327,8 +1533,7 @@
1327
1533
  "required": true
1328
1534
  },
1329
1535
  "data": {
1330
- "in": "body",
1331
- "type": "object"
1536
+ "in": "body"
1332
1537
  }
1333
1538
  }
1334
1539
  },
@@ -1351,8 +1556,7 @@
1351
1556
  "required": true
1352
1557
  },
1353
1558
  "data": {
1354
- "in": "body",
1355
- "type": "object"
1559
+ "in": "body"
1356
1560
  }
1357
1561
  }
1358
1562
  },
@@ -1474,6 +1678,17 @@
1474
1678
  }
1475
1679
  }
1476
1680
  },
1681
+ "ExperimentHomeKit": {
1682
+ "id": "experiment-homekit",
1683
+ "schema": {
1684
+ "type": "object",
1685
+ "properties": {
1686
+ "id": {
1687
+ "type": "string"
1688
+ }
1689
+ }
1690
+ }
1691
+ },
1477
1692
  "ExperimentPowerUser": {
1478
1693
  "id": "experiment-poweruser",
1479
1694
  "schema": {
@@ -2016,7 +2231,7 @@
2016
2231
  "path": "/flowcardcondition/:uri/:id/run",
2017
2232
  "private": false,
2018
2233
  "scopes": [
2019
- "homey.flow.start"
2234
+ "homey.flow"
2020
2235
  ],
2021
2236
  "parameters": {
2022
2237
  "id": {
@@ -2089,7 +2304,7 @@
2089
2304
  "path": "/flowcardaction/:uri/:id/run",
2090
2305
  "private": false,
2091
2306
  "scopes": [
2092
- "homey.flow.start"
2307
+ "homey.flow"
2093
2308
  ],
2094
2309
  "parameters": {
2095
2310
  "id": {
@@ -2310,6 +2525,40 @@
2310
2525
  "item": "FlowToken"
2311
2526
  },
2312
2527
  "parameters": {}
2528
+ },
2529
+ "getFlowToken": {
2530
+ "method": "get",
2531
+ "path": "/flowtoken/:id",
2532
+ "private": false,
2533
+ "scopes": [
2534
+ "homey.flow.readonly"
2535
+ ],
2536
+ "crud": {
2537
+ "type": "getOne",
2538
+ "item": "FlowToken"
2539
+ },
2540
+ "parameters": {
2541
+ "id": {
2542
+ "in": "path",
2543
+ "type": "string",
2544
+ "required": true
2545
+ }
2546
+ }
2547
+ },
2548
+ "getFlowTokenValue": {
2549
+ "method": "get",
2550
+ "path": "/flowtoken/:id/value",
2551
+ "private": false,
2552
+ "scopes": [
2553
+ "homey.flow.readonly"
2554
+ ],
2555
+ "parameters": {
2556
+ "id": {
2557
+ "in": "path",
2558
+ "type": "string",
2559
+ "required": true
2560
+ }
2561
+ }
2313
2562
  }
2314
2563
  }
2315
2564
  },
@@ -2806,6 +3055,25 @@
2806
3055
  ],
2807
3056
  "parameters": {}
2808
3057
  },
3058
+ "getVariable": {
3059
+ "method": "get",
3060
+ "path": "/variable/:id",
3061
+ "private": false,
3062
+ "scopes": [
3063
+ "homey.logic.readonly"
3064
+ ],
3065
+ "crud": {
3066
+ "type": "getOne",
3067
+ "item": "Variable"
3068
+ },
3069
+ "parameters": {
3070
+ "id": {
3071
+ "in": "path",
3072
+ "type": "string",
3073
+ "required": true
3074
+ }
3075
+ }
3076
+ },
2809
3077
  "getVariables": {
2810
3078
  "method": "get",
2811
3079
  "path": "/variable",
@@ -3138,6 +3406,21 @@
3138
3406
  }
3139
3407
  }
3140
3408
  },
3409
+ "getPresent": {
3410
+ "method": "get",
3411
+ "path": "/:id/present",
3412
+ "private": false,
3413
+ "scopes": [
3414
+ "homey.presence.readonly"
3415
+ ],
3416
+ "parameters": {
3417
+ "id": {
3418
+ "in": "path",
3419
+ "type": "string",
3420
+ "required": true
3421
+ }
3422
+ }
3423
+ },
3141
3424
  "setAsleepMe": {
3142
3425
  "method": "put",
3143
3426
  "path": "/me/asleep",
@@ -3179,6 +3462,21 @@
3179
3462
  "type": "boolean"
3180
3463
  }
3181
3464
  }
3465
+ },
3466
+ "getAsleep": {
3467
+ "method": "get",
3468
+ "path": "/:id/asleep",
3469
+ "private": false,
3470
+ "scopes": [
3471
+ "homey.presence.readonly"
3472
+ ],
3473
+ "parameters": {
3474
+ "id": {
3475
+ "in": "path",
3476
+ "type": "string",
3477
+ "required": true
3478
+ }
3479
+ }
3182
3480
  }
3183
3481
  }
3184
3482
  },
@@ -3562,6 +3860,21 @@
3562
3860
  "homey.system"
3563
3861
  ],
3564
3862
  "parameters": {}
3863
+ },
3864
+ "setDebug": {
3865
+ "method": "put",
3866
+ "path": "/debug",
3867
+ "private": false,
3868
+ "scopes": [
3869
+ "homey.system"
3870
+ ],
3871
+ "parameters": {
3872
+ "namespace": {
3873
+ "in": "body",
3874
+ "type": "string",
3875
+ "required": true
3876
+ }
3877
+ }
3565
3878
  }
3566
3879
  }
3567
3880
  },
@@ -4262,13 +4575,34 @@
4262
4575
  "method": "get",
4263
4576
  "path": "/zone",
4264
4577
  "private": false,
4265
- "scopes": [],
4578
+ "scopes": [
4579
+ "homey.zone.readonly"
4580
+ ],
4266
4581
  "crud": {
4267
4582
  "type": "getAll",
4268
4583
  "item": "Zone"
4269
4584
  },
4270
4585
  "parameters": {}
4271
4586
  },
4587
+ "getZone": {
4588
+ "method": "get",
4589
+ "path": "/zone/:id",
4590
+ "private": false,
4591
+ "scopes": [
4592
+ "homey.zone.readonly"
4593
+ ],
4594
+ "crud": {
4595
+ "type": "getOne",
4596
+ "item": "Zone"
4597
+ },
4598
+ "parameters": {
4599
+ "id": {
4600
+ "in": "path",
4601
+ "type": "string",
4602
+ "required": true
4603
+ }
4604
+ }
4605
+ },
4272
4606
  "createZone": {
4273
4607
  "method": "post",
4274
4608
  "path": "/zone",
@@ -4401,6 +4735,30 @@
4401
4735
  "homey.system"
4402
4736
  ],
4403
4737
  "parameters": {}
4738
+ },
4739
+ "getLog": {
4740
+ "method": "get",
4741
+ "path": "/log",
4742
+ "private": false,
4743
+ "scopes": [
4744
+ "homey.system"
4745
+ ],
4746
+ "parameters": {}
4747
+ },
4748
+ "setLogEnabled": {
4749
+ "method": "put",
4750
+ "path": "/log",
4751
+ "private": false,
4752
+ "scopes": [
4753
+ "homey.system"
4754
+ ],
4755
+ "parameters": {
4756
+ "enabled": {
4757
+ "in": "body",
4758
+ "type": "boolean",
4759
+ "required": true
4760
+ }
4761
+ }
4404
4762
  }
4405
4763
  }
4406
4764
  }