homey-api 3.6.3 → 3.6.5

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.
@@ -230,6 +230,10 @@
230
230
  "in": "query",
231
231
  "type": "array"
232
232
  },
233
+ "features": {
234
+ "in": "query",
235
+ "type": "array"
236
+ },
233
237
  "limit": {
234
238
  "in": "query",
235
239
  "type": "number"
@@ -638,6 +638,9 @@
638
638
  },
639
639
  "activationHistory": {
640
640
  "type": "array"
641
+ },
642
+ "model": {
643
+ "type": "string"
641
644
  }
642
645
  }
643
646
  }
@@ -684,6 +687,9 @@
684
687
  },
685
688
  "activationHistory": {
686
689
  "type": "array"
690
+ },
691
+ "model": {
692
+ "type": "string"
687
693
  }
688
694
  }
689
695
  }
@@ -363,6 +363,11 @@
363
363
  }
364
364
  }
365
365
  },
366
+ "restoreSubscriptions": {
367
+ "path": "/subscription/restore",
368
+ "method": "get",
369
+ "parameters": {}
370
+ },
366
371
  "getExpiredSubscriptions": {
367
372
  "path": "/subscription/expired",
368
373
  "method": "post",
@@ -1702,6 +1702,8 @@ export class AthomAppsAPI {
1702
1702
 
1703
1703
  category?: Array<any>;
1704
1704
 
1705
+ features?: Array<any>;
1706
+
1705
1707
  limit?: number;
1706
1708
 
1707
1709
  offset?: number;
@@ -2008,6 +2010,8 @@ export class AthomAppsAPI {
2008
2010
 
2009
2011
  category?: Array<any>;
2010
2012
 
2013
+ features?: Array<any>;
2014
+
2011
2015
  limit?: number;
2012
2016
 
2013
2017
  offset?: number;
@@ -2632,6 +2636,8 @@ export class AthomCloudAPI {
2632
2636
  manufacturedAt: string;
2633
2637
 
2634
2638
  activationHistory: Array<any>;
2639
+
2640
+ model: string;
2635
2641
  };
2636
2642
  }): Promise<any>;
2637
2643
 
@@ -2650,6 +2656,8 @@ export class AthomCloudAPI {
2650
2656
  manufacturedAt: string;
2651
2657
 
2652
2658
  activationHistory: Array<any>;
2659
+
2660
+ model: string;
2653
2661
  };
2654
2662
  }): Promise<any>;
2655
2663
 
@@ -3204,6 +3212,8 @@ export class AthomCloudAPI {
3204
3212
  manufacturedAt: string;
3205
3213
 
3206
3214
  activationHistory: Array<any>;
3215
+
3216
+ model: string;
3207
3217
  };
3208
3218
  }): Promise<any>;
3209
3219
 
@@ -3222,6 +3232,8 @@ export class AthomCloudAPI {
3222
3232
  manufacturedAt: string;
3223
3233
 
3224
3234
  activationHistory: Array<any>;
3235
+
3236
+ model: string;
3225
3237
  };
3226
3238
  }): Promise<any>;
3227
3239
 
@@ -4121,6 +4133,8 @@ export class AthomStoreAPI {
4121
4133
  duration?: string;
4122
4134
  }): Promise<any>;
4123
4135
 
4136
+ restoreSubscriptions(): Promise<any>;
4137
+
4124
4138
  getExpiredSubscriptions(opts: {
4125
4139
  users?: Array<any>;
4126
4140
 
@@ -4347,6 +4361,8 @@ export class AthomStoreAPI {
4347
4361
  duration?: string;
4348
4362
  }): Promise<any>;
4349
4363
 
4364
+ restoreSubscriptions(): Promise<any>;
4365
+
4350
4366
  getExpiredSubscriptions(opts: {
4351
4367
  users?: Array<any>;
4352
4368
 
@@ -4986,6 +5002,8 @@ export class AthomAppsAPI {
4986
5002
 
4987
5003
  category?: Array<any>;
4988
5004
 
5005
+ features?: Array<any>;
5006
+
4989
5007
  limit?: number;
4990
5008
 
4991
5009
  offset?: number;
@@ -5292,6 +5310,8 @@ export class AthomAppsAPI {
5292
5310
 
5293
5311
  category?: Array<any>;
5294
5312
 
5313
+ features?: Array<any>;
5314
+
5295
5315
  limit?: number;
5296
5316
 
5297
5317
  offset?: number;
@@ -5916,6 +5936,8 @@ export class AthomCloudAPI {
5916
5936
  manufacturedAt: string;
5917
5937
 
5918
5938
  activationHistory: Array<any>;
5939
+
5940
+ model: string;
5919
5941
  };
5920
5942
  }): Promise<any>;
5921
5943
 
@@ -5934,6 +5956,8 @@ export class AthomCloudAPI {
5934
5956
  manufacturedAt: string;
5935
5957
 
5936
5958
  activationHistory: Array<any>;
5959
+
5960
+ model: string;
5937
5961
  };
5938
5962
  }): Promise<any>;
5939
5963
 
@@ -6488,6 +6512,8 @@ export class AthomCloudAPI {
6488
6512
  manufacturedAt: string;
6489
6513
 
6490
6514
  activationHistory: Array<any>;
6515
+
6516
+ model: string;
6491
6517
  };
6492
6518
  }): Promise<any>;
6493
6519
 
@@ -6506,6 +6532,8 @@ export class AthomCloudAPI {
6506
6532
  manufacturedAt: string;
6507
6533
 
6508
6534
  activationHistory: Array<any>;
6535
+
6536
+ model: string;
6509
6537
  };
6510
6538
  }): Promise<any>;
6511
6539
 
@@ -7405,6 +7433,8 @@ export class AthomStoreAPI {
7405
7433
  duration?: string;
7406
7434
  }): Promise<any>;
7407
7435
 
7436
+ restoreSubscriptions(): Promise<any>;
7437
+
7408
7438
  getExpiredSubscriptions(opts: {
7409
7439
  users?: Array<any>;
7410
7440
 
@@ -7631,6 +7661,8 @@ export class AthomStoreAPI {
7631
7661
  duration?: string;
7632
7662
  }): Promise<any>;
7633
7663
 
7664
+ restoreSubscriptions(): Promise<any>;
7665
+
7634
7666
  getExpiredSubscriptions(opts: {
7635
7667
  users?: Array<any>;
7636
7668
 
package/lib/API.js CHANGED
@@ -73,6 +73,11 @@ class API {
73
73
  const query = { ...$query };
74
74
  const headers = { ...$headers };
75
75
 
76
+ // Set Authorization header if $token is provided
77
+ if (typeof $token === 'string') {
78
+ headers.Authorization = `Bearer ${$token}`;
79
+ }
80
+
76
81
  // Parse Parameters
77
82
  Object.entries(operation.parameters || {}).forEach(([parameterId, parameter]) => {
78
83
  let value = args[parameterId];
@@ -86,11 +91,6 @@ class API {
86
91
  value = this.__secret;
87
92
  }
88
93
 
89
- // Set Authorization header if $token is provided
90
- if (typeof $token === 'string') {
91
- headers.Authorization = `Bearer ${$token}`;
92
- }
93
-
94
94
  // Validate the parameter
95
95
  if ($validate) {
96
96
  if (parameter.required === true && typeof value === 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.6.3",
3
+ "version": "3.6.5",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [