homey-api 3.5.2 → 3.6.0
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.
|
@@ -514,6 +514,18 @@
|
|
|
514
514
|
"private": true,
|
|
515
515
|
"parameters": {}
|
|
516
516
|
},
|
|
517
|
+
"getPersonalAccessTokenApps": {
|
|
518
|
+
"path": "/user/me/pat/apps",
|
|
519
|
+
"method": "get",
|
|
520
|
+
"private": true,
|
|
521
|
+
"parameters": {}
|
|
522
|
+
},
|
|
523
|
+
"deletePersonalAccessTokenApps": {
|
|
524
|
+
"path": "/user/me/pat/apps",
|
|
525
|
+
"method": "delete",
|
|
526
|
+
"private": true,
|
|
527
|
+
"parameters": {}
|
|
528
|
+
},
|
|
517
529
|
"updateAuthenticatedUserPassword": {
|
|
518
530
|
"path": "/user/me/password",
|
|
519
531
|
"method": "post",
|
|
@@ -2539,6 +2539,10 @@ export class AthomCloudAPI {
|
|
|
2539
2539
|
|
|
2540
2540
|
getAcceptedInvites(): Promise<any>;
|
|
2541
2541
|
|
|
2542
|
+
getPersonalAccessTokenApps(): Promise<any>;
|
|
2543
|
+
|
|
2544
|
+
deletePersonalAccessTokenApps(): Promise<any>;
|
|
2545
|
+
|
|
2542
2546
|
updateAuthenticatedUserPassword(opts: {
|
|
2543
2547
|
password?: string;
|
|
2544
2548
|
|
|
@@ -3099,6 +3103,10 @@ export class AthomCloudAPI {
|
|
|
3099
3103
|
|
|
3100
3104
|
getAcceptedInvites(): Promise<any>;
|
|
3101
3105
|
|
|
3106
|
+
getPersonalAccessTokenApps(): Promise<any>;
|
|
3107
|
+
|
|
3108
|
+
deletePersonalAccessTokenApps(): Promise<any>;
|
|
3109
|
+
|
|
3102
3110
|
updateAuthenticatedUserPassword(opts: {
|
|
3103
3111
|
password?: string;
|
|
3104
3112
|
|
|
@@ -5791,6 +5799,10 @@ export class AthomCloudAPI {
|
|
|
5791
5799
|
|
|
5792
5800
|
getAcceptedInvites(): Promise<any>;
|
|
5793
5801
|
|
|
5802
|
+
getPersonalAccessTokenApps(): Promise<any>;
|
|
5803
|
+
|
|
5804
|
+
deletePersonalAccessTokenApps(): Promise<any>;
|
|
5805
|
+
|
|
5794
5806
|
updateAuthenticatedUserPassword(opts: {
|
|
5795
5807
|
password?: string;
|
|
5796
5808
|
|
|
@@ -6351,6 +6363,10 @@ export class AthomCloudAPI {
|
|
|
6351
6363
|
|
|
6352
6364
|
getAcceptedInvites(): Promise<any>;
|
|
6353
6365
|
|
|
6366
|
+
getPersonalAccessTokenApps(): Promise<any>;
|
|
6367
|
+
|
|
6368
|
+
deletePersonalAccessTokenApps(): Promise<any>;
|
|
6369
|
+
|
|
6354
6370
|
updateAuthenticatedUserPassword(opts: {
|
|
6355
6371
|
password?: string;
|
|
6356
6372
|
|
package/lib/AthomCloudAPI.js
CHANGED
|
@@ -125,6 +125,8 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
125
125
|
* @returns {Promise<boolean>}
|
|
126
126
|
*/
|
|
127
127
|
async isLoggedIn() {
|
|
128
|
+
if (this.__token && this.__token.access_token) return true;
|
|
129
|
+
|
|
128
130
|
const store = await this.__getStore();
|
|
129
131
|
|
|
130
132
|
if (!store.token || !store.token.access_token) return false;
|
|
@@ -152,7 +154,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
152
154
|
api: this,
|
|
153
155
|
properties: properties,
|
|
154
156
|
});
|
|
155
|
-
|
|
157
|
+
|
|
156
158
|
return this.__user;
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -296,7 +298,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
296
298
|
/*
|
|
297
299
|
* API overloads
|
|
298
300
|
*/
|
|
299
|
-
|
|
301
|
+
|
|
300
302
|
// eslint-disable-next-line no-unused-vars
|
|
301
303
|
async onCallRequestHeaders({ request }) {
|
|
302
304
|
// Try to set the Token from the StorageAdapter
|