homey-api 1.10.14 → 1.10.16

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.
@@ -1063,6 +1063,36 @@
1063
1063
  "type": "string"
1064
1064
  }
1065
1065
  }
1066
+ },
1067
+ "stopApp": {
1068
+ "method": "delete",
1069
+ "path": "/:session",
1070
+ "private": false,
1071
+ "scopes": [
1072
+ "homey.app"
1073
+ ],
1074
+ "parameters": {
1075
+ "session": {
1076
+ "in": "path",
1077
+ "type": "string",
1078
+ "required": true
1079
+ }
1080
+ }
1081
+ },
1082
+ "getAppStdOut": {
1083
+ "method": "get",
1084
+ "path": "/std/:session",
1085
+ "private": false,
1086
+ "scopes": [
1087
+ "homey.app"
1088
+ ],
1089
+ "parameters": {
1090
+ "session": {
1091
+ "in": "path",
1092
+ "type": "string",
1093
+ "required": true
1094
+ }
1095
+ }
1066
1096
  }
1067
1097
  }
1068
1098
  },
@@ -1426,17 +1456,6 @@
1426
1456
  }
1427
1457
  }
1428
1458
  },
1429
- "ExperimentHomeKit": {
1430
- "id": "experiment-homekit",
1431
- "schema": {
1432
- "type": "object",
1433
- "properties": {
1434
- "id": {
1435
- "type": "string"
1436
- }
1437
- }
1438
- }
1439
- },
1440
1459
  "ExperimentPowerUser": {
1441
1460
  "id": "experiment-poweruser",
1442
1461
  "schema": {
@@ -1900,6 +1919,30 @@
1900
1919
  }
1901
1920
  }
1902
1921
  },
1922
+ "getFlowCardTrigger": {
1923
+ "method": "get",
1924
+ "path": "/flowcardtrigger/:uri/:id",
1925
+ "private": false,
1926
+ "scopes": [
1927
+ "homey.flow.readonly"
1928
+ ],
1929
+ "crud": {
1930
+ "type": "getOne",
1931
+ "item": "FlowCardTrigger"
1932
+ },
1933
+ "parameters": {
1934
+ "id": {
1935
+ "in": "path",
1936
+ "type": "string",
1937
+ "required": true
1938
+ },
1939
+ "uri": {
1940
+ "in": "path",
1941
+ "type": "string",
1942
+ "required": true
1943
+ }
1944
+ }
1945
+ },
1903
1946
  "getFlowCardTriggers": {
1904
1947
  "method": "get",
1905
1948
  "path": "/flowcardtrigger",
@@ -1913,6 +1956,30 @@
1913
1956
  },
1914
1957
  "parameters": {}
1915
1958
  },
1959
+ "getFlowCardCondition": {
1960
+ "method": "get",
1961
+ "path": "/flowcardcondition/:uri/:id",
1962
+ "private": false,
1963
+ "scopes": [
1964
+ "homey.flow.readonly"
1965
+ ],
1966
+ "crud": {
1967
+ "type": "getOne",
1968
+ "item": "FlowCardCondition"
1969
+ },
1970
+ "parameters": {
1971
+ "id": {
1972
+ "in": "path",
1973
+ "type": "string",
1974
+ "required": true
1975
+ },
1976
+ "uri": {
1977
+ "in": "path",
1978
+ "type": "string",
1979
+ "required": true
1980
+ }
1981
+ }
1982
+ },
1916
1983
  "getFlowCardConditions": {
1917
1984
  "method": "get",
1918
1985
  "path": "/flowcardcondition",
@@ -1962,6 +2029,30 @@
1962
2029
  }
1963
2030
  }
1964
2031
  },
2032
+ "getFlowCardAction": {
2033
+ "method": "get",
2034
+ "path": "/flowcardaction/:uri/:id",
2035
+ "private": false,
2036
+ "scopes": [
2037
+ "homey.flow.readonly"
2038
+ ],
2039
+ "crud": {
2040
+ "type": "getOne",
2041
+ "item": "FlowCardAction"
2042
+ },
2043
+ "parameters": {
2044
+ "id": {
2045
+ "in": "path",
2046
+ "type": "string",
2047
+ "required": true
2048
+ },
2049
+ "uri": {
2050
+ "in": "path",
2051
+ "type": "string",
2052
+ "required": true
2053
+ }
2054
+ }
2055
+ },
1965
2056
  "getFlowCardActions": {
1966
2057
  "method": "get",
1967
2058
  "path": "/flowcardaction",
@@ -3282,7 +3373,8 @@
3282
3373
  "type": "string",
3283
3374
  "enum": [
3284
3375
  "OAUTH",
3285
- "APP"
3376
+ "APP",
3377
+ "PAT"
3286
3378
  ]
3287
3379
  },
3288
3380
  "scopes": {
@@ -2312,8 +2312,6 @@
2312
2312
 
2313
2313
 
2314
2314
 
2315
-
2316
-
2317
2315
 
2318
2316
 
2319
2317
 
@@ -2489,16 +2487,6 @@
2489
2487
 
2490
2488
  export namespace HomeyAPIV3Local.ManagerExperiments {
2491
2489
 
2492
- export class ExperimentHomeKit {
2493
-
2494
-
2495
-
2496
- id: string;
2497
-
2498
-
2499
-
2500
- }
2501
-
2502
2490
  export class ExperimentPowerUser {
2503
2491
 
2504
2492
 
@@ -11857,6 +11845,44 @@
11857
11845
 
11858
11846
 
11859
11847
 
11848
+ ):
11849
+ Promise<any>;
11850
+
11851
+ stopApp(
11852
+
11853
+
11854
+
11855
+
11856
+ opts: {
11857
+
11858
+
11859
+ session: string,
11860
+
11861
+
11862
+ },
11863
+
11864
+
11865
+
11866
+
11867
+ ):
11868
+ Promise<any>;
11869
+
11870
+ getAppStdOut(
11871
+
11872
+
11873
+
11874
+
11875
+ opts: {
11876
+
11877
+
11878
+ session: string,
11879
+
11880
+
11881
+ },
11882
+
11883
+
11884
+
11885
+
11860
11886
  ):
11861
11887
  Promise<any>;
11862
11888
 
@@ -12624,11 +12650,57 @@
12624
12650
  ):
12625
12651
  Promise<any>;
12626
12652
 
12653
+ getFlowCardTrigger(
12654
+
12655
+
12656
+
12657
+
12658
+ opts: {
12659
+
12660
+
12661
+ id: string,
12662
+
12663
+
12664
+
12665
+ uri: string,
12666
+
12667
+
12668
+ },
12669
+
12670
+
12671
+
12672
+
12673
+ ):
12674
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardTrigger>;
12675
+
12627
12676
  getFlowCardTriggers(
12628
12677
 
12629
12678
  ):
12630
12679
  Promise<HomeyAPIV3Local.ManagerFlow.FlowCardTrigger>;
12631
12680
 
12681
+ getFlowCardCondition(
12682
+
12683
+
12684
+
12685
+
12686
+ opts: {
12687
+
12688
+
12689
+ id: string,
12690
+
12691
+
12692
+
12693
+ uri: string,
12694
+
12695
+
12696
+ },
12697
+
12698
+
12699
+
12700
+
12701
+ ):
12702
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardCondition>;
12703
+
12632
12704
  getFlowCardConditions(
12633
12705
 
12634
12706
  ):
@@ -12673,6 +12745,29 @@
12673
12745
  ):
12674
12746
  Promise<any>;
12675
12747
 
12748
+ getFlowCardAction(
12749
+
12750
+
12751
+
12752
+
12753
+ opts: {
12754
+
12755
+
12756
+ id: string,
12757
+
12758
+
12759
+
12760
+ uri: string,
12761
+
12762
+
12763
+ },
12764
+
12765
+
12766
+
12767
+
12768
+ ):
12769
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardAction>;
12770
+
12676
12771
  getFlowCardActions(
12677
12772
 
12678
12773
  ):
@@ -7702,8 +7702,6 @@
7702
7702
 
7703
7703
 
7704
7704
 
7705
-
7706
-
7707
7705
 
7708
7706
 
7709
7707
 
@@ -7899,16 +7897,6 @@
7899
7897
 
7900
7898
  export namespace HomeyAPIV3Local.ManagerExperiments {
7901
7899
 
7902
- export class ExperimentHomeKit {
7903
-
7904
-
7905
-
7906
- id: string;
7907
-
7908
-
7909
-
7910
- }
7911
-
7912
7900
  export class ExperimentPowerUser {
7913
7901
 
7914
7902
 
@@ -17955,6 +17943,44 @@
17955
17943
 
17956
17944
 
17957
17945
 
17946
+ ):
17947
+ Promise<any>;
17948
+
17949
+ stopApp(
17950
+
17951
+
17952
+
17953
+
17954
+ opts: {
17955
+
17956
+
17957
+ session: string,
17958
+
17959
+
17960
+ },
17961
+
17962
+
17963
+
17964
+
17965
+ ):
17966
+ Promise<any>;
17967
+
17968
+ getAppStdOut(
17969
+
17970
+
17971
+
17972
+
17973
+ opts: {
17974
+
17975
+
17976
+ session: string,
17977
+
17978
+
17979
+ },
17980
+
17981
+
17982
+
17983
+
17958
17984
  ):
17959
17985
  Promise<any>;
17960
17986
 
@@ -18722,11 +18748,57 @@
18722
18748
  ):
18723
18749
  Promise<any>;
18724
18750
 
18751
+ getFlowCardTrigger(
18752
+
18753
+
18754
+
18755
+
18756
+ opts: {
18757
+
18758
+
18759
+ id: string,
18760
+
18761
+
18762
+
18763
+ uri: string,
18764
+
18765
+
18766
+ },
18767
+
18768
+
18769
+
18770
+
18771
+ ):
18772
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardTrigger>;
18773
+
18725
18774
  getFlowCardTriggers(
18726
18775
 
18727
18776
  ):
18728
18777
  Promise<HomeyAPIV3Local.ManagerFlow.FlowCardTrigger>;
18729
18778
 
18779
+ getFlowCardCondition(
18780
+
18781
+
18782
+
18783
+
18784
+ opts: {
18785
+
18786
+
18787
+ id: string,
18788
+
18789
+
18790
+
18791
+ uri: string,
18792
+
18793
+
18794
+ },
18795
+
18796
+
18797
+
18798
+
18799
+ ):
18800
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardCondition>;
18801
+
18730
18802
  getFlowCardConditions(
18731
18803
 
18732
18804
  ):
@@ -18771,6 +18843,29 @@
18771
18843
  ):
18772
18844
  Promise<any>;
18773
18845
 
18846
+ getFlowCardAction(
18847
+
18848
+
18849
+
18850
+
18851
+ opts: {
18852
+
18853
+
18854
+ id: string,
18855
+
18856
+
18857
+
18858
+ uri: string,
18859
+
18860
+
18861
+ },
18862
+
18863
+
18864
+
18865
+
18866
+ ):
18867
+ Promise<HomeyAPIV3Local.ManagerFlow.FlowCardAction>;
18868
+
18774
18869
  getFlowCardActions(
18775
18870
 
18776
18871
  ):
@@ -209,7 +209,7 @@ class Manager extends EventEmitter {
209
209
  // try to get the CRUD Item from Cache.
210
210
  if (this.isConnected() && operation.crud && $cache === true) {
211
211
  const itemId = items[operation.crud.item].id;
212
- const itemType = items[operation.crud.item].type;
212
+ const itemType = items[operation.crud.item].type || 'id';
213
213
 
214
214
  switch (operation.crud.type) {
215
215
  case 'getOne': {
@@ -291,7 +291,7 @@ class Manager extends EventEmitter {
291
291
  // Transform and cache output if this is a CRUD call
292
292
  if (operation.crud) {
293
293
  const itemId = items[operation.crud.item].id;
294
- const itemType = items[operation.crud.item].type;
294
+ const itemType = items[operation.crud.item].type || 'id';
295
295
  const ItemClass = this.constructor.ITEMS[itemId] || Item;
296
296
  const getItemKey = props => {
297
297
  if (itemType === 'filter') return `${props.uri}:${props.id}`;
@@ -460,7 +460,7 @@ class Manager extends EventEmitter {
460
460
  || event.endsWith('.delete')) {
461
461
  const [itemId, operation] = event.split('.');
462
462
  const ItemClass = this.constructor.ITEMS[itemId] || Item;
463
- const itemType = this.__itemsById[itemId].type;
463
+ const itemType = this.__itemsById[itemId].type || 'id';
464
464
  const key = itemType === 'filter'
465
465
  ? `${data.uri}:${data.id}`
466
466
  : `${data.id}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "1.10.14",
3
+ "version": "1.10.16",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [