homey-api 1.7.0 → 1.7.4

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.
@@ -201,6 +201,29 @@
201
201
  ):
202
202
  Promise<void>;
203
203
 
204
+ authenticateWithAuthorizationCode(
205
+
206
+
207
+
208
+
209
+ opts: {
210
+
211
+
212
+ code: String,
213
+
214
+
215
+
216
+ removeCodeFromHistory: Boolean,
217
+
218
+
219
+ },
220
+
221
+
222
+
223
+
224
+ ):
225
+ Promise<AthomCloudAPI.Token>;
226
+
204
227
  }
205
228
 
206
229
  export class HomeyAPI {
@@ -2985,6 +2985,73 @@
2985
2985
  ):
2986
2986
  Promise<void>;
2987
2987
 
2988
+ authenticateWithAuthorizationCode(
2989
+
2990
+
2991
+
2992
+
2993
+ opts: {
2994
+
2995
+
2996
+ code: String,
2997
+
2998
+
2999
+
3000
+ removeCodeFromHistory: Boolean,
3001
+
3002
+
3003
+ },
3004
+
3005
+
3006
+
3007
+
3008
+ ):
3009
+ Promise<AthomCloudAPI.Token>;
3010
+
3011
+ updateUserMe(
3012
+
3013
+
3014
+
3015
+
3016
+ opts: {
3017
+
3018
+
3019
+ firstname: String,
3020
+
3021
+
3022
+
3023
+ lastname: String,
3024
+
3025
+
3026
+
3027
+ email: String,
3028
+
3029
+
3030
+ },
3031
+
3032
+
3033
+
3034
+
3035
+ ):
3036
+ Promise<AthomCloudAPI.User>;
3037
+
3038
+ updateUserMeAvatar(
3039
+
3040
+
3041
+
3042
+
3043
+ imageBuffer: Buffer,
3044
+
3045
+
3046
+
3047
+ imageType: "jpg" | "jpeg" | "png" | "gif",
3048
+
3049
+
3050
+
3051
+
3052
+ ):
3053
+ Promise<Object>;
3054
+
2988
3055
  }
2989
3056
 
2990
3057
  export class AthomConnectAPI {
@@ -206,6 +206,9 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
206
206
  * @returns {Promise<void>}
207
207
  */
208
208
  async logout() {
209
+ // Delete Cached User
210
+ this.__user = null;
211
+
209
212
  // Delete Token from Store
210
213
  await this.__resetStore();
211
214
  this.__token = null;
@@ -549,7 +552,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
549
552
  * Update the currently authenticated user's avatar.
550
553
  *
551
554
  * @private
552
- * @param {Buffer} imageBuffer Buffer of the new avatat
555
+ * @param {Buffer} imageBuffer Buffer of the new avatar
553
556
  * @param {"jpg"|"jpeg"|"png"|"gif"} imageType Type of the new avatar
554
557
  * @returns {Promise<Object>}
555
558
  */
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "1.7.0",
3
+ "version": "1.7.4",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
+ "files": [
7
+ "/lib",
8
+ "/assets/specifications",
9
+ "/assets/types",
10
+ "/index.js",
11
+ "/index.browser.js"
12
+ ],
6
13
  "types": "assets/types/homey-api.d.ts",
7
14
  "scripts": {
8
15
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -11,12 +18,11 @@
11
18
  "build": "npm run build:specs; npm run build:jsdoc; npm run build:types; npm run build:webpack;",
12
19
  "build:webpack": "npm run webpack",
13
20
  "build:webpack:watch": "npm run webpack:watch",
14
- "build:jsdoc": "npm run jsdoc:clean; npm run generate-specs; npm run generate-jsdoc; npm run jsdoc;",
15
21
  "build:types": "npm run generate-types;",
16
22
  "build:specs": "npm run generate-specs",
17
23
  "webpack": "webpack",
18
24
  "webpack:watch": "webpack --watch",
19
- "jsdoc": "jsdoc --configure ./jsdoc.json --recurse --destination build/jsdoc; jsdoc --configure ./jsdoc.json --recurse --private --destination build/jsdoc/private; rm build/jsdoc/*.js.html;",
25
+ "jsdoc": "npm run jsdoc:clean; npm run generate-specs; npm run generate-jsdoc; jsdoc --configure ./jsdoc.json --recurse; jsdoc --configure ./jsdoc.json --recurse --private --destination ./jsdoc/private; rm ./jsdoc/*.js.html;",
20
26
  "jsdoc:clean": "rm -rf ./build/jsdoc; rm -rf ./build/jsdoc-tmp",
21
27
  "jsdoc:watch": "watch \"npm run jsdoc:clean; npm run generate-jsdoc; npm run jsdoc;\" lib \"node_modules/homey-jsdoc-template\" --interval 0.5",
22
28
  "jsdoc:serve": "http-server ./build/jsdoc/",
@@ -44,6 +50,7 @@
44
50
  "socket.io-client": "^1.7.4"
45
51
  },
46
52
  "devDependencies": {
53
+ "@athombv/jsdoc-template": "^1.6.1",
47
54
  "@babel/core": "^7.16.0",
48
55
  "@babel/plugin-proposal-class-properties": "^7.16.0",
49
56
  "@babel/preset-env": "^7.16.0",
@@ -53,7 +60,6 @@
53
60
  "eslint": "^7.32.0",
54
61
  "eslint-config-athom": "^2.1.1",
55
62
  "fs-extra": "^10.0.0",
56
- "homey-jsdoc-template": "github:athombv/homey-jsdoc-template#1.5.1",
57
63
  "http-server": "^0.12.3",
58
64
  "jsdoc": "^3.6.7",
59
65
  "jsdoc-to-markdown": "^7.1.0",