homey-api 3.6.1 → 3.6.3

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.
@@ -4525,9 +4525,109 @@
4525
4525
  "delete": "dashboard.delete"
4526
4526
  }
4527
4527
  }
4528
+ },
4529
+ "AppWidget": {
4530
+ "id": "appwidget",
4531
+ "type": "id",
4532
+ "schema": {
4533
+ "type": "object",
4534
+ "properties": {
4535
+ "id": {
4536
+ "type": "string"
4537
+ },
4538
+ "ownerId": {
4539
+ "type": "string"
4540
+ },
4541
+ "ownerUri": {
4542
+ "type": "string"
4543
+ },
4544
+ "ownerName": {
4545
+ "type": "string"
4546
+ },
4547
+ "name": {
4548
+ "type": "string"
4549
+ },
4550
+ "settings": {
4551
+ "type": "object"
4552
+ },
4553
+ "height": {
4554
+ "type": [
4555
+ "number",
4556
+ "string"
4557
+ ]
4558
+ }
4559
+ },
4560
+ "x-realtime-bindings": {
4561
+ "read": "getAppWidget",
4562
+ "create": "appwidget.create",
4563
+ "update": "appwidget.update",
4564
+ "delete": "appwidget.delete"
4565
+ }
4566
+ }
4528
4567
  }
4529
4568
  },
4530
4569
  "operations": {
4570
+ "getAppWidgetAutocomplete": {
4571
+ "method": "GET",
4572
+ "path": "/appwidget/:id/autocomplete",
4573
+ "private": false,
4574
+ "scopes": [
4575
+ "homey.dashboard.readonly"
4576
+ ],
4577
+ "parameters": {
4578
+ "id": {
4579
+ "in": "path",
4580
+ "required": true,
4581
+ "type": "string"
4582
+ },
4583
+ "settings": {
4584
+ "in": "query",
4585
+ "type": "string"
4586
+ },
4587
+ "query": {
4588
+ "in": "query",
4589
+ "type": "string",
4590
+ "required": true
4591
+ },
4592
+ "settingId": {
4593
+ "in": "query",
4594
+ "type": "string",
4595
+ "required": true
4596
+ }
4597
+ }
4598
+ },
4599
+ "getAppWidget": {
4600
+ "method": "GET",
4601
+ "path": "/appwidget/:id",
4602
+ "private": false,
4603
+ "scopes": [
4604
+ "homey.dashboard.readonly"
4605
+ ],
4606
+ "crud": {
4607
+ "type": "getOne",
4608
+ "item": "AppWidget"
4609
+ },
4610
+ "parameters": {
4611
+ "id": {
4612
+ "in": "path",
4613
+ "required": true,
4614
+ "type": "string"
4615
+ }
4616
+ }
4617
+ },
4618
+ "getAppWidgets": {
4619
+ "method": "GET",
4620
+ "path": "/appwidget",
4621
+ "private": false,
4622
+ "scopes": [
4623
+ "homey.dashboard.readonly"
4624
+ ],
4625
+ "crud": {
4626
+ "type": "getAll",
4627
+ "item": "AppWidget"
4628
+ },
4629
+ "parameters": {}
4630
+ },
4531
4631
  "deleteDashboard": {
4532
4632
  "method": "DELETE",
4533
4633
  "path": "/dashboard/:id",
@@ -609,6 +609,12 @@ export namespace HomeyAPIV2.ManagerZones {
609
609
  active: boolean;
610
610
 
611
611
  icon: string;
612
+
613
+ uri: string;
614
+
615
+ manager: HomeyAPIV3.Manager;
616
+
617
+ homey: HomeyAPIV3;
612
618
  }
613
619
  }
614
620
 
@@ -982,8 +988,20 @@ export namespace HomeyAPIV3Cloud.ManagerVirtualDevice {
982
988
  }
983
989
 
984
990
  export namespace HomeyAPIV3Cloud.ManagerZones {
985
- export class Zone {
991
+ export class Zone extends HomeyAPIV3.ManagerZones.Zone {
986
992
  id: string;
993
+
994
+ uri: string;
995
+
996
+ manager: HomeyAPIV3.Manager;
997
+
998
+ homey: HomeyAPIV3;
999
+
1000
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
1001
+
1002
+ connect(): Promise<any>;
1003
+
1004
+ disconnect(): Promise<any>;
987
1005
  }
988
1006
  }
989
1007
 
@@ -1425,8 +1443,20 @@ export namespace HomeyAPIV3Local.ManagerVirtualDevice {
1425
1443
  }
1426
1444
 
1427
1445
  export namespace HomeyAPIV3Local.ManagerZones {
1428
- export class Zone {
1446
+ export class Zone extends HomeyAPIV3.ManagerZones.Zone {
1429
1447
  id: string;
1448
+
1449
+ uri: string;
1450
+
1451
+ manager: HomeyAPIV3.Manager;
1452
+
1453
+ homey: HomeyAPIV3;
1454
+
1455
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
1456
+
1457
+ connect(): Promise<any>;
1458
+
1459
+ disconnect(): Promise<any>;
1430
1460
  }
1431
1461
  }
1432
1462
 
@@ -4425,3 +4455,21 @@ export namespace HomeyAPIV3.ManagerInsights {
4425
4455
  disconnect(): Promise<any>;
4426
4456
  }
4427
4457
  }
4458
+
4459
+ export namespace HomeyAPIV3.ManagerZones {
4460
+ export class Zone extends HomeyAPIV3.Item {
4461
+ id: string;
4462
+
4463
+ uri: string;
4464
+
4465
+ manager: HomeyAPIV3.Manager;
4466
+
4467
+ homey: HomeyAPIV3;
4468
+
4469
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
4470
+
4471
+ connect(): Promise<any>;
4472
+
4473
+ disconnect(): Promise<any>;
4474
+ }
4475
+ }
@@ -131,6 +131,22 @@ export namespace HomeyAPIV2.ManagerApps {
131
131
  }
132
132
 
133
133
  export namespace HomeyAPIV2.ManagerDashboards {
134
+ export class AppWidget extends HomeyAPIV3Local.ManagerDashboards.AppWidget {
135
+ id: string;
136
+
137
+ ownerId: string;
138
+
139
+ ownerUri: string;
140
+
141
+ ownerName: string;
142
+
143
+ name: string;
144
+
145
+ settings: object;
146
+
147
+ height: number | string;
148
+ }
149
+
134
150
  export class Dashboard extends HomeyAPIV3Local.ManagerDashboards.Dashboard {
135
151
  id: string;
136
152
 
@@ -633,6 +649,12 @@ export namespace HomeyAPIV2.ManagerZones {
633
649
  active: boolean;
634
650
 
635
651
  icon: string;
652
+
653
+ uri: string;
654
+
655
+ manager: HomeyAPIV3.Manager;
656
+
657
+ homey: HomeyAPIV3;
636
658
  }
637
659
  }
638
660
 
@@ -1030,8 +1052,20 @@ export namespace HomeyAPIV3Cloud.ManagerVirtualDevice {
1030
1052
  }
1031
1053
 
1032
1054
  export namespace HomeyAPIV3Cloud.ManagerZones {
1033
- export class Zone {
1055
+ export class Zone extends HomeyAPIV3.ManagerZones.Zone {
1034
1056
  id: string;
1057
+
1058
+ uri: string;
1059
+
1060
+ manager: HomeyAPIV3.Manager;
1061
+
1062
+ homey: HomeyAPIV3;
1063
+
1064
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
1065
+
1066
+ connect(): Promise<any>;
1067
+
1068
+ disconnect(): Promise<any>;
1035
1069
  }
1036
1070
  }
1037
1071
 
@@ -1501,8 +1535,20 @@ export namespace HomeyAPIV3Local.ManagerVirtualDevice {
1501
1535
  }
1502
1536
 
1503
1537
  export namespace HomeyAPIV3Local.ManagerZones {
1504
- export class Zone {
1538
+ export class Zone extends HomeyAPIV3.ManagerZones.Zone {
1505
1539
  id: string;
1540
+
1541
+ uri: string;
1542
+
1543
+ manager: HomeyAPIV3.Manager;
1544
+
1545
+ homey: HomeyAPIV3;
1546
+
1547
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
1548
+
1549
+ connect(): Promise<any>;
1550
+
1551
+ disconnect(): Promise<any>;
1506
1552
  }
1507
1553
  }
1508
1554
 
@@ -10955,3 +11001,21 @@ export namespace HomeyAPIV3.ManagerInsights {
10955
11001
  disconnect(): Promise<any>;
10956
11002
  }
10957
11003
  }
11004
+
11005
+ export namespace HomeyAPIV3.ManagerZones {
11006
+ export class Zone extends HomeyAPIV3.Item {
11007
+ id: string;
11008
+
11009
+ uri: string;
11010
+
11011
+ manager: HomeyAPIV3.Manager;
11012
+
11013
+ homey: HomeyAPIV3;
11014
+
11015
+ getParent(): Promise<HomeyAPIV3.ManagerZones.Zone | null>;
11016
+
11017
+ connect(): Promise<any>;
11018
+
11019
+ disconnect(): Promise<any>;
11020
+ }
11021
+ }
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ const Item = require('../Item');
4
+
5
+ /**
6
+ * @class
7
+ * @hideconstructor
8
+ * @extends HomeyAPIV3.Item
9
+ * @memberof HomeyAPIV3.ManagerZones
10
+ */
11
+ class Zone extends Item {
12
+
13
+ /**
14
+ * Get the parent zone.
15
+ * @returns {Promise<HomeyAPIV3.ManagerZones.Zone|null>}
16
+ */
17
+ async getParent() {
18
+ if (!this.parent) return null;
19
+
20
+ return this.homey.zones.getZone({
21
+ id: this.parent,
22
+ });
23
+ }
24
+
25
+ }
26
+
27
+ module.exports = Zone;
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ const Manager = require('./Manager');
4
+ const Zone = require('./ManagerZones/Zone');
5
+
6
+ class ManagerZones extends Manager {
7
+
8
+ static CRUD = {
9
+ ...super.CRUD,
10
+ Zone,
11
+ }
12
+
13
+ }
14
+
15
+ module.exports = ManagerZones;
@@ -12,6 +12,7 @@ const ManagerFlow = require('./HomeyAPIV3/ManagerFlow');
12
12
  const ManagerFlowToken = require('./HomeyAPIV3/ManagerFlowToken');
13
13
  const ManagerInsights = require('./HomeyAPIV3/ManagerInsights');
14
14
  const ManagerUsers = require('./HomeyAPIV3/ManagerUsers');
15
+ const ManagerZones = require('./HomeyAPIV3/ManagerZones');
15
16
  const Manager = require('./HomeyAPIV3/Manager');
16
17
 
17
18
  /**
@@ -29,6 +30,7 @@ class HomeyAPIV3 extends HomeyAPI {
29
30
  ManagerFlowToken,
30
31
  ManagerInsights,
31
32
  ManagerUsers,
33
+ ManagerZones,
32
34
  };
33
35
 
34
36
  static DEFAULT_TIMEOUT = 1000 * 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [