homey-api 3.6.4 → 3.6.6
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.
|
@@ -819,6 +819,21 @@
|
|
|
819
819
|
"in": "body"
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
+
},
|
|
823
|
+
"createAppSuggestion": {
|
|
824
|
+
"path": "/app/{appId}/suggestion",
|
|
825
|
+
"method": "post",
|
|
826
|
+
"parameters": {
|
|
827
|
+
"appId": {
|
|
828
|
+
"in": "path",
|
|
829
|
+
"type": "string",
|
|
830
|
+
"required": true
|
|
831
|
+
},
|
|
832
|
+
"suggestionText": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"in": "body"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
822
837
|
}
|
|
823
838
|
}
|
|
824
839
|
}
|
|
@@ -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
|
}
|
|
@@ -1905,6 +1905,12 @@ export class AthomAppsAPI {
|
|
|
1905
1905
|
mac?: Array<any>;
|
|
1906
1906
|
}): Promise<any>;
|
|
1907
1907
|
|
|
1908
|
+
createAppSuggestion(opts: {
|
|
1909
|
+
appId: string;
|
|
1910
|
+
|
|
1911
|
+
suggestionText?: string;
|
|
1912
|
+
}): Promise<any>;
|
|
1913
|
+
|
|
1908
1914
|
updateArchive(opts: {
|
|
1909
1915
|
archiveId: string;
|
|
1910
1916
|
|
|
@@ -2212,6 +2218,12 @@ export class AthomAppsAPI {
|
|
|
2212
2218
|
|
|
2213
2219
|
mac?: Array<any>;
|
|
2214
2220
|
}): Promise<any>;
|
|
2221
|
+
|
|
2222
|
+
createAppSuggestion(opts: {
|
|
2223
|
+
appId: string;
|
|
2224
|
+
|
|
2225
|
+
suggestionText?: string;
|
|
2226
|
+
}): Promise<any>;
|
|
2215
2227
|
}
|
|
2216
2228
|
|
|
2217
2229
|
export class AthomBackupAPI {
|
|
@@ -2636,6 +2648,8 @@ export class AthomCloudAPI {
|
|
|
2636
2648
|
manufacturedAt: string;
|
|
2637
2649
|
|
|
2638
2650
|
activationHistory: Array<any>;
|
|
2651
|
+
|
|
2652
|
+
model: string;
|
|
2639
2653
|
};
|
|
2640
2654
|
}): Promise<any>;
|
|
2641
2655
|
|
|
@@ -2654,6 +2668,8 @@ export class AthomCloudAPI {
|
|
|
2654
2668
|
manufacturedAt: string;
|
|
2655
2669
|
|
|
2656
2670
|
activationHistory: Array<any>;
|
|
2671
|
+
|
|
2672
|
+
model: string;
|
|
2657
2673
|
};
|
|
2658
2674
|
}): Promise<any>;
|
|
2659
2675
|
|
|
@@ -3208,6 +3224,8 @@ export class AthomCloudAPI {
|
|
|
3208
3224
|
manufacturedAt: string;
|
|
3209
3225
|
|
|
3210
3226
|
activationHistory: Array<any>;
|
|
3227
|
+
|
|
3228
|
+
model: string;
|
|
3211
3229
|
};
|
|
3212
3230
|
}): Promise<any>;
|
|
3213
3231
|
|
|
@@ -3226,6 +3244,8 @@ export class AthomCloudAPI {
|
|
|
3226
3244
|
manufacturedAt: string;
|
|
3227
3245
|
|
|
3228
3246
|
activationHistory: Array<any>;
|
|
3247
|
+
|
|
3248
|
+
model: string;
|
|
3229
3249
|
};
|
|
3230
3250
|
}): Promise<any>;
|
|
3231
3251
|
|
|
@@ -5197,6 +5217,12 @@ export class AthomAppsAPI {
|
|
|
5197
5217
|
mac?: Array<any>;
|
|
5198
5218
|
}): Promise<any>;
|
|
5199
5219
|
|
|
5220
|
+
createAppSuggestion(opts: {
|
|
5221
|
+
appId: string;
|
|
5222
|
+
|
|
5223
|
+
suggestionText?: string;
|
|
5224
|
+
}): Promise<any>;
|
|
5225
|
+
|
|
5200
5226
|
updateArchive(opts: {
|
|
5201
5227
|
archiveId: string;
|
|
5202
5228
|
|
|
@@ -5504,6 +5530,12 @@ export class AthomAppsAPI {
|
|
|
5504
5530
|
|
|
5505
5531
|
mac?: Array<any>;
|
|
5506
5532
|
}): Promise<any>;
|
|
5533
|
+
|
|
5534
|
+
createAppSuggestion(opts: {
|
|
5535
|
+
appId: string;
|
|
5536
|
+
|
|
5537
|
+
suggestionText?: string;
|
|
5538
|
+
}): Promise<any>;
|
|
5507
5539
|
}
|
|
5508
5540
|
|
|
5509
5541
|
export class AthomBackupAPI {
|
|
@@ -5928,6 +5960,8 @@ export class AthomCloudAPI {
|
|
|
5928
5960
|
manufacturedAt: string;
|
|
5929
5961
|
|
|
5930
5962
|
activationHistory: Array<any>;
|
|
5963
|
+
|
|
5964
|
+
model: string;
|
|
5931
5965
|
};
|
|
5932
5966
|
}): Promise<any>;
|
|
5933
5967
|
|
|
@@ -5946,6 +5980,8 @@ export class AthomCloudAPI {
|
|
|
5946
5980
|
manufacturedAt: string;
|
|
5947
5981
|
|
|
5948
5982
|
activationHistory: Array<any>;
|
|
5983
|
+
|
|
5984
|
+
model: string;
|
|
5949
5985
|
};
|
|
5950
5986
|
}): Promise<any>;
|
|
5951
5987
|
|
|
@@ -6500,6 +6536,8 @@ export class AthomCloudAPI {
|
|
|
6500
6536
|
manufacturedAt: string;
|
|
6501
6537
|
|
|
6502
6538
|
activationHistory: Array<any>;
|
|
6539
|
+
|
|
6540
|
+
model: string;
|
|
6503
6541
|
};
|
|
6504
6542
|
}): Promise<any>;
|
|
6505
6543
|
|
|
@@ -6518,6 +6556,8 @@ export class AthomCloudAPI {
|
|
|
6518
6556
|
manufacturedAt: string;
|
|
6519
6557
|
|
|
6520
6558
|
activationHistory: Array<any>;
|
|
6559
|
+
|
|
6560
|
+
model: string;
|
|
6521
6561
|
};
|
|
6522
6562
|
}): Promise<any>;
|
|
6523
6563
|
|
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') {
|