homey-api 3.6.4 → 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.
|
@@ -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
|
}
|
|
@@ -2636,6 +2636,8 @@ export class AthomCloudAPI {
|
|
|
2636
2636
|
manufacturedAt: string;
|
|
2637
2637
|
|
|
2638
2638
|
activationHistory: Array<any>;
|
|
2639
|
+
|
|
2640
|
+
model: string;
|
|
2639
2641
|
};
|
|
2640
2642
|
}): Promise<any>;
|
|
2641
2643
|
|
|
@@ -2654,6 +2656,8 @@ export class AthomCloudAPI {
|
|
|
2654
2656
|
manufacturedAt: string;
|
|
2655
2657
|
|
|
2656
2658
|
activationHistory: Array<any>;
|
|
2659
|
+
|
|
2660
|
+
model: string;
|
|
2657
2661
|
};
|
|
2658
2662
|
}): Promise<any>;
|
|
2659
2663
|
|
|
@@ -3208,6 +3212,8 @@ export class AthomCloudAPI {
|
|
|
3208
3212
|
manufacturedAt: string;
|
|
3209
3213
|
|
|
3210
3214
|
activationHistory: Array<any>;
|
|
3215
|
+
|
|
3216
|
+
model: string;
|
|
3211
3217
|
};
|
|
3212
3218
|
}): Promise<any>;
|
|
3213
3219
|
|
|
@@ -3226,6 +3232,8 @@ export class AthomCloudAPI {
|
|
|
3226
3232
|
manufacturedAt: string;
|
|
3227
3233
|
|
|
3228
3234
|
activationHistory: Array<any>;
|
|
3235
|
+
|
|
3236
|
+
model: string;
|
|
3229
3237
|
};
|
|
3230
3238
|
}): Promise<any>;
|
|
3231
3239
|
|
|
@@ -5928,6 +5936,8 @@ export class AthomCloudAPI {
|
|
|
5928
5936
|
manufacturedAt: string;
|
|
5929
5937
|
|
|
5930
5938
|
activationHistory: Array<any>;
|
|
5939
|
+
|
|
5940
|
+
model: string;
|
|
5931
5941
|
};
|
|
5932
5942
|
}): Promise<any>;
|
|
5933
5943
|
|
|
@@ -5946,6 +5956,8 @@ export class AthomCloudAPI {
|
|
|
5946
5956
|
manufacturedAt: string;
|
|
5947
5957
|
|
|
5948
5958
|
activationHistory: Array<any>;
|
|
5959
|
+
|
|
5960
|
+
model: string;
|
|
5949
5961
|
};
|
|
5950
5962
|
}): Promise<any>;
|
|
5951
5963
|
|
|
@@ -6500,6 +6512,8 @@ export class AthomCloudAPI {
|
|
|
6500
6512
|
manufacturedAt: string;
|
|
6501
6513
|
|
|
6502
6514
|
activationHistory: Array<any>;
|
|
6515
|
+
|
|
6516
|
+
model: string;
|
|
6503
6517
|
};
|
|
6504
6518
|
}): Promise<any>;
|
|
6505
6519
|
|
|
@@ -6518,6 +6532,8 @@ export class AthomCloudAPI {
|
|
|
6518
6532
|
manufacturedAt: string;
|
|
6519
6533
|
|
|
6520
6534
|
activationHistory: Array<any>;
|
|
6535
|
+
|
|
6536
|
+
model: string;
|
|
6521
6537
|
};
|
|
6522
6538
|
}): Promise<any>;
|
|
6523
6539
|
|
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') {
|