homey-api 3.11.3 → 3.12.1

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.
@@ -106,7 +106,7 @@
106
106
  "type": "string",
107
107
  "in": "body"
108
108
  },
109
- "payload": {
109
+ "recordings": {
110
110
  "type": "array",
111
111
  "in": "body"
112
112
  }
@@ -630,6 +630,63 @@
630
630
  }
631
631
  }
632
632
  },
633
+ "getAuthenticatedUserClients": {
634
+ "path": "/user/me/client",
635
+ "method": "get",
636
+ "parameters": {}
637
+ },
638
+ "createAuthenticatedUserClient": {
639
+ "path": "/user/me/client",
640
+ "method": "post",
641
+ "parameters": {
642
+ "name": {
643
+ "type": "string",
644
+ "in": "body"
645
+ },
646
+ "redirectUri": {
647
+ "type": "array",
648
+ "in": "body"
649
+ },
650
+ "scopes": {
651
+ "type": "array",
652
+ "in": "body"
653
+ }
654
+ }
655
+ },
656
+ "updateAuthenticatedUserClient": {
657
+ "path": "/user/me/client/{id}",
658
+ "method": "put",
659
+ "parameters": {
660
+ "id": {
661
+ "in": "path",
662
+ "type": "string",
663
+ "required": true
664
+ },
665
+ "name": {
666
+ "type": "string",
667
+ "in": "body"
668
+ },
669
+ "redirectUri": {
670
+ "type": "array",
671
+ "in": "body"
672
+ },
673
+ "scopes": {
674
+ "type": "array",
675
+ "in": "body"
676
+ }
677
+ }
678
+ },
679
+ "deleteAuthenticatedUserClient": {
680
+ "path": "/user/me/client/{id}",
681
+ "method": "delete",
682
+ "parameters": {
683
+ "id": {
684
+ "in": "path",
685
+ "type": "string",
686
+ "required": true
687
+ }
688
+ }
689
+ },
633
690
  "getBridges": {
634
691
  "path": "/bridge/",
635
692
  "method": "get",
@@ -0,0 +1,74 @@
1
+ {
2
+ "host": "energy-api.athom.com",
3
+ "basePath": "/api/v1/",
4
+ "operations": {
5
+ "getZone": {
6
+ "path": "/zone",
7
+ "method": "get",
8
+ "parameters": {
9
+ "latitude": {
10
+ "in": "query",
11
+ "type": "string",
12
+ "required": true
13
+ },
14
+ "longitude": {
15
+ "in": "query",
16
+ "type": "string",
17
+ "required": true
18
+ },
19
+ "secret": {
20
+ "in": "query",
21
+ "type": "string"
22
+ }
23
+ }
24
+ },
25
+ "getZones": {
26
+ "path": "/zones",
27
+ "method": "get",
28
+ "parameters": {
29
+ "secret": {
30
+ "in": "query",
31
+ "type": "string"
32
+ }
33
+ }
34
+ },
35
+ "getDayAheadPricesElectricity": {
36
+ "path": "/day-ahead-prices/electricity",
37
+ "method": "get",
38
+ "parameters": {
39
+ "zoneId": {
40
+ "in": "query",
41
+ "type": "string",
42
+ "required": true
43
+ },
44
+ "zoneVersion": {
45
+ "in": "query",
46
+ "type": "string",
47
+ "required": true
48
+ },
49
+ "date": {
50
+ "in": "query",
51
+ "type": "string",
52
+ "required": true
53
+ },
54
+ "timezone": {
55
+ "in": "query",
56
+ "type": "string",
57
+ "required": true
58
+ },
59
+ "currency": {
60
+ "in": "query",
61
+ "type": "string"
62
+ },
63
+ "interval": {
64
+ "in": "query",
65
+ "type": "string"
66
+ },
67
+ "secret": {
68
+ "in": "query",
69
+ "type": "string"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -1587,6 +1587,28 @@ export class AthomCloudAPI {
1587
1587
 
1588
1588
  getInstallerInformation(opts: { userId: string }): Promise<any>;
1589
1589
 
1590
+ getAuthenticatedUserClients(): Promise<any>;
1591
+
1592
+ createAuthenticatedUserClient(opts: {
1593
+ name?: string;
1594
+
1595
+ redirectUri?: Array<any>;
1596
+
1597
+ scopes?: Array<any>;
1598
+ }): Promise<any>;
1599
+
1600
+ updateAuthenticatedUserClient(opts: {
1601
+ id: string;
1602
+
1603
+ name?: string;
1604
+
1605
+ redirectUri?: Array<any>;
1606
+
1607
+ scopes?: Array<any>;
1608
+ }): Promise<any>;
1609
+
1610
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
1611
+
1590
1612
  isLoggedIn(): Promise<boolean>;
1591
1613
 
1592
1614
  getAuthenticatedUser(opts?: { $cache?: object }): Promise<AthomCloudAPI.User>;
@@ -1619,6 +1641,28 @@ export class AthomCloudAPI {
1619
1641
 
1620
1642
  getInstallerInformation(opts: { userId: string }): Promise<any>;
1621
1643
 
1644
+ getAuthenticatedUserClients(): Promise<any>;
1645
+
1646
+ createAuthenticatedUserClient(opts: {
1647
+ name?: string;
1648
+
1649
+ redirectUri?: Array<any>;
1650
+
1651
+ scopes?: Array<any>;
1652
+ }): Promise<any>;
1653
+
1654
+ updateAuthenticatedUserClient(opts: {
1655
+ id: string;
1656
+
1657
+ name?: string;
1658
+
1659
+ redirectUri?: Array<any>;
1660
+
1661
+ scopes?: Array<any>;
1662
+ }): Promise<any>;
1663
+
1664
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
1665
+
1622
1666
  isLoggedIn(): Promise<boolean>;
1623
1667
 
1624
1668
  getAuthenticatedUser(opts?: { $cache?: object }): Promise<AthomCloudAPI.User>;
@@ -1771,6 +1815,28 @@ export class AthomCloudAPI {
1771
1815
 
1772
1816
  getInstallerInformation(opts: { userId: string }): Promise<any>;
1773
1817
 
1818
+ getAuthenticatedUserClients(): Promise<any>;
1819
+
1820
+ createAuthenticatedUserClient(opts: {
1821
+ name?: string;
1822
+
1823
+ redirectUri?: Array<any>;
1824
+
1825
+ scopes?: Array<any>;
1826
+ }): Promise<any>;
1827
+
1828
+ updateAuthenticatedUserClient(opts: {
1829
+ id: string;
1830
+
1831
+ name?: string;
1832
+
1833
+ redirectUri?: Array<any>;
1834
+
1835
+ scopes?: Array<any>;
1836
+ }): Promise<any>;
1837
+
1838
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
1839
+
1774
1840
  isLoggedIn(): Promise<boolean>;
1775
1841
 
1776
1842
  getAuthenticatedUser(opts?: { $cache?: object }): Promise<AthomCloudAPI.User>;
@@ -1803,6 +1869,28 @@ export class AthomCloudAPI {
1803
1869
 
1804
1870
  getInstallerInformation(opts: { userId: string }): Promise<any>;
1805
1871
 
1872
+ getAuthenticatedUserClients(): Promise<any>;
1873
+
1874
+ createAuthenticatedUserClient(opts: {
1875
+ name?: string;
1876
+
1877
+ redirectUri?: Array<any>;
1878
+
1879
+ scopes?: Array<any>;
1880
+ }): Promise<any>;
1881
+
1882
+ updateAuthenticatedUserClient(opts: {
1883
+ id: string;
1884
+
1885
+ name?: string;
1886
+
1887
+ redirectUri?: Array<any>;
1888
+
1889
+ scopes?: Array<any>;
1890
+ }): Promise<any>;
1891
+
1892
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
1893
+
1806
1894
  isLoggedIn(): Promise<boolean>;
1807
1895
 
1808
1896
  getAuthenticatedUser(opts?: { $cache?: object }): Promise<AthomCloudAPI.User>;
@@ -1727,7 +1727,7 @@ export class AthomAppsAPI {
1727
1727
 
1728
1728
  homeyPlatform?: string;
1729
1729
 
1730
- payload?: Array<any>;
1730
+ recordings?: Array<any>;
1731
1731
  }): Promise<any>;
1732
1732
 
1733
1733
  searchZigbeeDriver(opts: {
@@ -2061,7 +2061,7 @@ export class AthomAppsAPI {
2061
2061
 
2062
2062
  homeyPlatform?: string;
2063
2063
 
2064
- payload?: Array<any>;
2064
+ recordings?: Array<any>;
2065
2065
  }): Promise<any>;
2066
2066
 
2067
2067
  searchZigbeeDriver(opts: {
@@ -2764,6 +2764,28 @@ export class AthomCloudAPI {
2764
2764
 
2765
2765
  getInstallerInformation(opts: { userId: string }): Promise<any>;
2766
2766
 
2767
+ getAuthenticatedUserClients(): Promise<any>;
2768
+
2769
+ createAuthenticatedUserClient(opts: {
2770
+ name?: string;
2771
+
2772
+ redirectUri?: Array<any>;
2773
+
2774
+ scopes?: Array<any>;
2775
+ }): Promise<any>;
2776
+
2777
+ updateAuthenticatedUserClient(opts: {
2778
+ id: string;
2779
+
2780
+ name?: string;
2781
+
2782
+ redirectUri?: Array<any>;
2783
+
2784
+ scopes?: Array<any>;
2785
+ }): Promise<any>;
2786
+
2787
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
2788
+
2767
2789
  getBridges(opts: {
2768
2790
  serial?: string;
2769
2791
 
@@ -3350,6 +3372,28 @@ export class AthomCloudAPI {
3350
3372
 
3351
3373
  getInstallerInformation(opts: { userId: string }): Promise<any>;
3352
3374
 
3375
+ getAuthenticatedUserClients(): Promise<any>;
3376
+
3377
+ createAuthenticatedUserClient(opts: {
3378
+ name?: string;
3379
+
3380
+ redirectUri?: Array<any>;
3381
+
3382
+ scopes?: Array<any>;
3383
+ }): Promise<any>;
3384
+
3385
+ updateAuthenticatedUserClient(opts: {
3386
+ id: string;
3387
+
3388
+ name?: string;
3389
+
3390
+ redirectUri?: Array<any>;
3391
+
3392
+ scopes?: Array<any>;
3393
+ }): Promise<any>;
3394
+
3395
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
3396
+
3353
3397
  getBridges(opts: {
3354
3398
  serial?: string;
3355
3399
 
@@ -3803,6 +3847,68 @@ export class AthomDNSAPI {
3803
3847
  getHomeyCertificate(opts: { secret: string }): Promise<any>;
3804
3848
  }
3805
3849
 
3850
+ export class AthomEnergyAPI {
3851
+ constructor(opts?: {
3852
+ baseUrl?: string;
3853
+
3854
+ debug?: boolean;
3855
+
3856
+ secret?: string;
3857
+ });
3858
+
3859
+ getZone(opts: {
3860
+ latitude: string;
3861
+
3862
+ longitude: string;
3863
+
3864
+ secret?: string;
3865
+ }): Promise<any>;
3866
+
3867
+ getZones(opts: { secret?: string }): Promise<any>;
3868
+
3869
+ getDayAheadPricesElectricity(opts: {
3870
+ zoneId: string;
3871
+
3872
+ zoneVersion: string;
3873
+
3874
+ date: string;
3875
+
3876
+ timezone: string;
3877
+
3878
+ currency?: string;
3879
+
3880
+ interval?: string;
3881
+
3882
+ secret?: string;
3883
+ }): Promise<any>;
3884
+
3885
+ getZone(opts: {
3886
+ latitude: string;
3887
+
3888
+ longitude: string;
3889
+
3890
+ secret?: string;
3891
+ }): Promise<any>;
3892
+
3893
+ getZones(opts: { secret?: string }): Promise<any>;
3894
+
3895
+ getDayAheadPricesElectricity(opts: {
3896
+ zoneId: string;
3897
+
3898
+ zoneVersion: string;
3899
+
3900
+ date: string;
3901
+
3902
+ timezone: string;
3903
+
3904
+ currency?: string;
3905
+
3906
+ interval?: string;
3907
+
3908
+ secret?: string;
3909
+ }): Promise<any>;
3910
+ }
3911
+
3806
3912
  export class AthomFirmwareAPI {
3807
3913
  constructor(opts?: {
3808
3914
  baseUrl?: string;
@@ -5099,7 +5205,7 @@ export class AthomAppsAPI {
5099
5205
 
5100
5206
  homeyPlatform?: string;
5101
5207
 
5102
- payload?: Array<any>;
5208
+ recordings?: Array<any>;
5103
5209
  }): Promise<any>;
5104
5210
 
5105
5211
  searchZigbeeDriver(opts: {
@@ -5433,7 +5539,7 @@ export class AthomAppsAPI {
5433
5539
 
5434
5540
  homeyPlatform?: string;
5435
5541
 
5436
- payload?: Array<any>;
5542
+ recordings?: Array<any>;
5437
5543
  }): Promise<any>;
5438
5544
 
5439
5545
  searchZigbeeDriver(opts: {
@@ -6136,6 +6242,28 @@ export class AthomCloudAPI {
6136
6242
 
6137
6243
  getInstallerInformation(opts: { userId: string }): Promise<any>;
6138
6244
 
6245
+ getAuthenticatedUserClients(): Promise<any>;
6246
+
6247
+ createAuthenticatedUserClient(opts: {
6248
+ name?: string;
6249
+
6250
+ redirectUri?: Array<any>;
6251
+
6252
+ scopes?: Array<any>;
6253
+ }): Promise<any>;
6254
+
6255
+ updateAuthenticatedUserClient(opts: {
6256
+ id: string;
6257
+
6258
+ name?: string;
6259
+
6260
+ redirectUri?: Array<any>;
6261
+
6262
+ scopes?: Array<any>;
6263
+ }): Promise<any>;
6264
+
6265
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
6266
+
6139
6267
  getBridges(opts: {
6140
6268
  serial?: string;
6141
6269
 
@@ -6722,6 +6850,28 @@ export class AthomCloudAPI {
6722
6850
 
6723
6851
  getInstallerInformation(opts: { userId: string }): Promise<any>;
6724
6852
 
6853
+ getAuthenticatedUserClients(): Promise<any>;
6854
+
6855
+ createAuthenticatedUserClient(opts: {
6856
+ name?: string;
6857
+
6858
+ redirectUri?: Array<any>;
6859
+
6860
+ scopes?: Array<any>;
6861
+ }): Promise<any>;
6862
+
6863
+ updateAuthenticatedUserClient(opts: {
6864
+ id: string;
6865
+
6866
+ name?: string;
6867
+
6868
+ redirectUri?: Array<any>;
6869
+
6870
+ scopes?: Array<any>;
6871
+ }): Promise<any>;
6872
+
6873
+ deleteAuthenticatedUserClient(opts: { id: string }): Promise<any>;
6874
+
6725
6875
  getBridges(opts: {
6726
6876
  serial?: string;
6727
6877
 
@@ -7175,6 +7325,68 @@ export class AthomDNSAPI {
7175
7325
  getHomeyCertificate(opts: { secret: string }): Promise<any>;
7176
7326
  }
7177
7327
 
7328
+ export class AthomEnergyAPI {
7329
+ constructor(opts?: {
7330
+ baseUrl?: string;
7331
+
7332
+ debug?: boolean;
7333
+
7334
+ secret?: string;
7335
+ });
7336
+
7337
+ getZone(opts: {
7338
+ latitude: string;
7339
+
7340
+ longitude: string;
7341
+
7342
+ secret?: string;
7343
+ }): Promise<any>;
7344
+
7345
+ getZones(opts: { secret?: string }): Promise<any>;
7346
+
7347
+ getDayAheadPricesElectricity(opts: {
7348
+ zoneId: string;
7349
+
7350
+ zoneVersion: string;
7351
+
7352
+ date: string;
7353
+
7354
+ timezone: string;
7355
+
7356
+ currency?: string;
7357
+
7358
+ interval?: string;
7359
+
7360
+ secret?: string;
7361
+ }): Promise<any>;
7362
+
7363
+ getZone(opts: {
7364
+ latitude: string;
7365
+
7366
+ longitude: string;
7367
+
7368
+ secret?: string;
7369
+ }): Promise<any>;
7370
+
7371
+ getZones(opts: { secret?: string }): Promise<any>;
7372
+
7373
+ getDayAheadPricesElectricity(opts: {
7374
+ zoneId: string;
7375
+
7376
+ zoneVersion: string;
7377
+
7378
+ date: string;
7379
+
7380
+ timezone: string;
7381
+
7382
+ currency?: string;
7383
+
7384
+ interval?: string;
7385
+
7386
+ secret?: string;
7387
+ }): Promise<any>;
7388
+ }
7389
+
7178
7390
  export class AthomFirmwareAPI {
7179
7391
  constructor(opts?: {
7180
7392
  baseUrl?: string;
package/index.js CHANGED
@@ -19,6 +19,7 @@ module.exports.AthomSetupAPI = require('./lib/AthomSetupAPI');
19
19
  module.exports.AthomStoreAPI = require('./lib/AthomStoreAPI');
20
20
  module.exports.AthomWeatherAPI = require('./lib/AthomWeatherAPI');
21
21
  module.exports.AthomWebhooksAPI = require('./lib/AthomWebhooksAPI');
22
+ module.exports.AthomEnergyAPI = require('./lib/AthomEnergyAPI');
22
23
 
23
24
  // Homey Cloud
24
25
  module.exports.HomeyCloudAPI = require('./lib/HomeyCloudAPI');
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const API = require('./API');
4
+
5
+ class AthomEnergyAPI extends API {
6
+
7
+ static SPECIFICATION = require('../assets/specifications/AthomEnergyAPI.json');
8
+ static SPECIFICATION_URL = 'https://energy-api.athom.com/api/v1/specification.json';
9
+ static JSDOC_PRIVATE = true;
10
+
11
+ }
12
+
13
+ module.exports = AthomEnergyAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.11.3",
3
+ "version": "3.12.1",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [