homey-api 3.5.0 → 3.5.2

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.
@@ -374,6 +374,36 @@
374
374
  }
375
375
  }
376
376
  },
377
+ "verifyOneTimePurchase": {
378
+ "path": "/one-time-purchase/verify",
379
+ "method": "post",
380
+ "parameters": {
381
+ "homeyId": {
382
+ "type": "string",
383
+ "in": "body"
384
+ },
385
+ "token": {
386
+ "type": "string",
387
+ "in": "body"
388
+ },
389
+ "sku": {
390
+ "type": "string",
391
+ "in": "body"
392
+ },
393
+ "packageName": {
394
+ "type": "string",
395
+ "in": "body"
396
+ },
397
+ "receipt": {
398
+ "type": "string",
399
+ "in": "body"
400
+ },
401
+ "orderId": {
402
+ "type": "string",
403
+ "in": "body"
404
+ }
405
+ }
406
+ },
377
407
  "getOffer": {
378
408
  "path": "/offer/{offerId}",
379
409
  "method": "get",
@@ -767,6 +767,7 @@
767
767
  "id": "dashboard",
768
768
  "schema": {
769
769
  "type": "object",
770
+ "additionalProperties": false,
770
771
  "properties": {
771
772
  "id": {
772
773
  "type": "string",
@@ -775,56 +776,28 @@
775
776
  "name": {
776
777
  "type": "string"
777
778
  },
778
- "widgets": {
779
- "type": "object",
780
- "additionalProperties": false,
781
- "patternProperties": {
782
- "^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$": {
783
- "type": "object",
784
- "properties": {
785
- "type": {
786
- "type": "string"
787
- },
788
- "x": {
789
- "type": "number"
790
- },
791
- "y": {
792
- "type": "number"
793
- },
794
- "width": {
795
- "type": "number"
796
- },
797
- "height": {
798
- "type": "number"
799
- },
800
- "settings": {
801
- "type": "object"
802
- }
803
- }
804
- }
805
- }
806
- },
807
- "lines": {
808
- "type": "object",
809
- "additionalProperties": false,
810
- "patternProperties": {
811
- "^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$": {
812
- "type": "object",
813
- "properties": {
814
- "x1": {
815
- "type": "number"
816
- },
817
- "x2": {
818
- "type": "number"
819
- },
820
- "y1": {
821
- "type": "number"
822
- },
823
- "y2": {
824
- "type": "number"
825
- },
826
- "settings": {
827
- "type": "object"
779
+ "columns": {
780
+ "type": "array",
781
+ "items": {
782
+ "type": "object",
783
+ "properties": {
784
+ "id": {
785
+ "type": "string",
786
+ "format": "uuid"
787
+ },
788
+ "widgets": {
789
+ "type": "array",
790
+ "items": {
791
+ "type": "object",
792
+ "required": [
793
+ "id"
794
+ ],
795
+ "properties": {
796
+ "id": {
797
+ "type": "string",
798
+ "format": "uuid"
799
+ }
800
+ }
828
801
  }
829
802
  }
830
803
  }
@@ -832,6 +805,17 @@
832
805
  }
833
806
  }
834
807
  }
808
+ },
809
+ "AppWidget": {
810
+ "id": "appwidget",
811
+ "schema": {
812
+ "type": "object",
813
+ "properties": {
814
+ "id": {
815
+ "type": "string"
816
+ }
817
+ }
818
+ }
835
819
  }
836
820
  },
837
821
  "operations": {
@@ -898,12 +882,8 @@
898
882
  "type": "string",
899
883
  "required": true
900
884
  },
901
- "widgets": {
902
- "type": "object",
903
- "required": true
904
- },
905
- "lines": {
906
- "type": "object",
885
+ "columns": {
886
+ "type": "array",
907
887
  "required": true
908
888
  }
909
889
  }
@@ -936,11 +916,8 @@
936
916
  "name": {
937
917
  "type": "string"
938
918
  },
939
- "widgets": {
940
- "type": "object"
941
- },
942
- "lines": {
943
- "type": "object"
919
+ "columns": {
920
+ "type": "array"
944
921
  }
945
922
  }
946
923
  }
@@ -964,6 +941,46 @@
964
941
  "required": true
965
942
  }
966
943
  }
944
+ },
945
+ "getAppWidgets": {
946
+ "method": "get",
947
+ "path": "/appwidget",
948
+ "private": false,
949
+ "scopes": [
950
+ "homey.dashboard.readonly"
951
+ ],
952
+ "crud": {
953
+ "type": "getAll",
954
+ "item": "AppWidget"
955
+ },
956
+ "parameters": {}
957
+ },
958
+ "getAppWidgetAutocomplete": {
959
+ "method": "get",
960
+ "path": "/appwidget/:id/autocomplete",
961
+ "private": false,
962
+ "scopes": [],
963
+ "parameters": {
964
+ "id": {
965
+ "in": "path",
966
+ "type": "string",
967
+ "required": true
968
+ },
969
+ "settingId": {
970
+ "in": "query",
971
+ "type": "string",
972
+ "required": true
973
+ },
974
+ "query": {
975
+ "in": "query",
976
+ "type": "string",
977
+ "required": true
978
+ },
979
+ "settings": {
980
+ "in": "query",
981
+ "type": "object"
982
+ }
983
+ }
967
984
  }
968
985
  }
969
986
  },
@@ -3296,6 +3313,15 @@
3296
3313
  "name": {
3297
3314
  "type": "string"
3298
3315
  },
3316
+ "preset": {
3317
+ "type": [
3318
+ "string",
3319
+ "null"
3320
+ ]
3321
+ },
3322
+ "zone": {
3323
+ "type": "string"
3324
+ },
3299
3325
  "devices": {
3300
3326
  "type": "object",
3301
3327
  "additionalProperties": false,
@@ -3399,6 +3425,9 @@
3399
3425
  "devices": {
3400
3426
  "type": "object",
3401
3427
  "required": true
3428
+ },
3429
+ "preset": {
3430
+ "type": "string"
3402
3431
  }
3403
3432
  }
3404
3433
  }
@@ -3432,6 +3461,9 @@
3432
3461
  },
3433
3462
  "devices": {
3434
3463
  "type": "object"
3464
+ },
3465
+ "preset": {
3466
+ "type": "string"
3435
3467
  }
3436
3468
  }
3437
3469
  }
@@ -3442,7 +3474,7 @@
3442
3474
  "path": "/mood/:id/set",
3443
3475
  "private": false,
3444
3476
  "scopes": [
3445
- "homey.mood.start"
3477
+ "homey.mood.set"
3446
3478
  ],
3447
3479
  "parameters": {
3448
3480
  "id": {
@@ -3470,15 +3502,6 @@
3470
3502
  "required": true
3471
3503
  }
3472
3504
  }
3473
- },
3474
- "debug": {
3475
- "method": "get",
3476
- "path": "/debug",
3477
- "private": true,
3478
- "scopes": [
3479
- "homey.mood"
3480
- ],
3481
- "parameters": {}
3482
3505
  }
3483
3506
  }
3484
3507
  },
@@ -4043,7 +4066,12 @@
4043
4066
  "path": "/ping",
4044
4067
  "private": false,
4045
4068
  "scopes": [],
4046
- "parameters": {}
4069
+ "parameters": {
4070
+ "id": {
4071
+ "in": "query",
4072
+ "type": "string"
4073
+ }
4074
+ }
4047
4075
  },
4048
4076
  "getInfo": {
4049
4077
  "method": "get",
@@ -4160,6 +4188,29 @@
4160
4188
  "homey.system"
4161
4189
  ],
4162
4190
  "parameters": {}
4191
+ },
4192
+ "startProfile": {
4193
+ "method": "post",
4194
+ "path": "/profile/start",
4195
+ "private": true,
4196
+ "scopes": [
4197
+ "homey.system"
4198
+ ],
4199
+ "parameters": {
4200
+ "duration": {
4201
+ "in": "body",
4202
+ "type": "number"
4203
+ }
4204
+ }
4205
+ },
4206
+ "stopProfile": {
4207
+ "method": "post",
4208
+ "path": "/profile/stop",
4209
+ "private": true,
4210
+ "scopes": [
4211
+ "homey.system"
4212
+ ],
4213
+ "parameters": {}
4163
4214
  }
4164
4215
  }
4165
4216
  },
@@ -4214,6 +4265,24 @@
4214
4265
  "required": true
4215
4266
  }
4216
4267
  }
4268
+ },
4269
+ "apiDisable": {
4270
+ "method": "get",
4271
+ "path": "/disable",
4272
+ "private": true,
4273
+ "scopes": [
4274
+ "homey.system"
4275
+ ],
4276
+ "parameters": {}
4277
+ },
4278
+ "apiEnable": {
4279
+ "method": "get",
4280
+ "path": "/enable",
4281
+ "private": true,
4282
+ "scopes": [
4283
+ "homey.system"
4284
+ ],
4285
+ "parameters": {}
4217
4286
  }
4218
4287
  }
4219
4288
  },
@@ -5106,7 +5175,12 @@
5106
5175
  "scopes": [
5107
5176
  "homey.system"
5108
5177
  ],
5109
- "parameters": {}
5178
+ "parameters": {
5179
+ "erase": {
5180
+ "in": "query",
5181
+ "type": "string"
5182
+ }
5183
+ }
5110
5184
  },
5111
5185
  "getLog": {
5112
5186
  "method": "get",
@@ -4020,7 +4020,7 @@ export namespace HomeyAPIV3Local {
4020
4020
 
4021
4021
  getState(): Promise<any>;
4022
4022
 
4023
- ping(): Promise<any>;
4023
+ ping(opts: { id?: string }): Promise<any>;
4024
4024
 
4025
4025
  getInfo(): Promise<any>;
4026
4026
 
@@ -137,10 +137,6 @@ export namespace HomeyAPIV2.ManagerDashboards {
137
137
  name: string;
138
138
 
139
139
  columns: Array<any>;
140
-
141
- widgets: object;
142
-
143
- lines: object;
144
140
  }
145
141
  }
146
142
 
@@ -1100,14 +1096,16 @@ export namespace HomeyAPIV3Local.ManagerCron {
1100
1096
  }
1101
1097
 
1102
1098
  export namespace HomeyAPIV3Local.ManagerDashboards {
1099
+ export class AppWidget {
1100
+ id: string;
1101
+ }
1102
+
1103
1103
  export class Dashboard {
1104
1104
  id: string;
1105
1105
 
1106
1106
  name: string;
1107
1107
 
1108
- widgets: object;
1109
-
1110
- lines: object;
1108
+ columns: Array<any>;
1111
1109
  }
1112
1110
  }
1113
1111
 
@@ -1382,6 +1380,10 @@ export namespace HomeyAPIV3Local.ManagerMoods {
1382
1380
 
1383
1381
  name: string;
1384
1382
 
1383
+ preset: string | null;
1384
+
1385
+ zone: string;
1386
+
1385
1387
  devices: object;
1386
1388
  }
1387
1389
  }
@@ -4049,6 +4051,20 @@ export class AthomStoreAPI {
4049
4051
  secret: string;
4050
4052
  }): Promise<any>;
4051
4053
 
4054
+ verifyOneTimePurchase(opts: {
4055
+ homeyId?: string;
4056
+
4057
+ token?: string;
4058
+
4059
+ sku?: string;
4060
+
4061
+ packageName?: string;
4062
+
4063
+ receipt?: string;
4064
+
4065
+ orderId?: string;
4066
+ }): Promise<any>;
4067
+
4052
4068
  getOffer(opts: { offerId: string }): Promise<any>;
4053
4069
 
4054
4070
  redeemReferAFriend(opts: {
@@ -4259,6 +4275,20 @@ export class AthomStoreAPI {
4259
4275
  secret: string;
4260
4276
  }): Promise<any>;
4261
4277
 
4278
+ verifyOneTimePurchase(opts: {
4279
+ homeyId?: string;
4280
+
4281
+ token?: string;
4282
+
4283
+ sku?: string;
4284
+
4285
+ packageName?: string;
4286
+
4287
+ receipt?: string;
4288
+
4289
+ orderId?: string;
4290
+ }): Promise<any>;
4291
+
4262
4292
  getOffer(opts: { offerId: string }): Promise<any>;
4263
4293
 
4264
4294
  redeemReferAFriend(opts: {
@@ -7273,6 +7303,20 @@ export class AthomStoreAPI {
7273
7303
  secret: string;
7274
7304
  }): Promise<any>;
7275
7305
 
7306
+ verifyOneTimePurchase(opts: {
7307
+ homeyId?: string;
7308
+
7309
+ token?: string;
7310
+
7311
+ sku?: string;
7312
+
7313
+ packageName?: string;
7314
+
7315
+ receipt?: string;
7316
+
7317
+ orderId?: string;
7318
+ }): Promise<any>;
7319
+
7276
7320
  getOffer(opts: { offerId: string }): Promise<any>;
7277
7321
 
7278
7322
  redeemReferAFriend(opts: {
@@ -7483,6 +7527,20 @@ export class AthomStoreAPI {
7483
7527
  secret: string;
7484
7528
  }): Promise<any>;
7485
7529
 
7530
+ verifyOneTimePurchase(opts: {
7531
+ homeyId?: string;
7532
+
7533
+ token?: string;
7534
+
7535
+ sku?: string;
7536
+
7537
+ packageName?: string;
7538
+
7539
+ receipt?: string;
7540
+
7541
+ orderId?: string;
7542
+ }): Promise<any>;
7543
+
7486
7544
  getOffer(opts: { offerId: string }): Promise<any>;
7487
7545
 
7488
7546
  redeemReferAFriend(opts: {
@@ -9624,9 +9682,7 @@ export namespace HomeyAPIV3Local {
9624
9682
  dashboard: {
9625
9683
  name: string;
9626
9684
 
9627
- widgets: object;
9628
-
9629
- lines: object;
9685
+ columns: Array<any>;
9630
9686
  };
9631
9687
  }): Promise<HomeyAPIV3Local.ManagerDashboards.Dashboard>;
9632
9688
 
@@ -9636,13 +9692,25 @@ export namespace HomeyAPIV3Local {
9636
9692
  dashboard: {
9637
9693
  name?: string;
9638
9694
 
9639
- widgets?: object;
9640
-
9641
- lines?: object;
9695
+ columns?: Array<any>;
9642
9696
  };
9643
9697
  }): Promise<HomeyAPIV3Local.ManagerDashboards.Dashboard>;
9644
9698
 
9645
9699
  deleteDashboard(opts: { id: string }): Promise<any>;
9700
+
9701
+ getAppWidgets(): Promise<{
9702
+ [key: string]: HomeyAPIV3Local.ManagerDashboards.AppWidget;
9703
+ }>;
9704
+
9705
+ getAppWidgetAutocomplete(opts: {
9706
+ id: string;
9707
+
9708
+ settingId: string;
9709
+
9710
+ query: string;
9711
+
9712
+ settings?: object;
9713
+ }): Promise<any>;
9646
9714
  }
9647
9715
 
9648
9716
  export class ManagerDatabase extends HomeyAPIV3.ManagerDatabase {
@@ -10241,6 +10309,8 @@ export namespace HomeyAPIV3Local {
10241
10309
  name: string;
10242
10310
 
10243
10311
  devices: object;
10312
+
10313
+ preset?: string;
10244
10314
  };
10245
10315
  }): Promise<HomeyAPIV3Local.ManagerMoods.Mood>;
10246
10316
 
@@ -10251,14 +10321,14 @@ export namespace HomeyAPIV3Local {
10251
10321
  name?: string;
10252
10322
 
10253
10323
  devices?: object;
10324
+
10325
+ preset?: string;
10254
10326
  };
10255
10327
  }): Promise<HomeyAPIV3Local.ManagerMoods.Mood>;
10256
10328
 
10257
10329
  setMood(opts: { id: string }): Promise<any>;
10258
10330
 
10259
10331
  deleteMood(opts: { id: string }): Promise<any>;
10260
-
10261
- debug(): Promise<any>;
10262
10332
  }
10263
10333
 
10264
10334
  export class ManagerNotifications extends HomeyAPIV3.ManagerNotifications {
@@ -10394,7 +10464,7 @@ export namespace HomeyAPIV3Local {
10394
10464
 
10395
10465
  getState(): Promise<any>;
10396
10466
 
10397
- ping(): Promise<any>;
10467
+ ping(opts: { id?: string }): Promise<any>;
10398
10468
 
10399
10469
  getInfo(): Promise<any>;
10400
10470
 
@@ -10417,6 +10487,10 @@ export namespace HomeyAPIV3Local {
10417
10487
  enableWifi(): Promise<any>;
10418
10488
 
10419
10489
  disableWifi(): Promise<any>;
10490
+
10491
+ startProfile(opts: { duration?: number }): Promise<any>;
10492
+
10493
+ stopProfile(): Promise<any>;
10420
10494
  }
10421
10495
 
10422
10496
  export class ManagerThread extends HomeyAPIV3.ManagerThread {
@@ -10427,6 +10501,10 @@ export namespace HomeyAPIV3Local {
10427
10501
  reset(opts: { target?: string }): Promise<any>;
10428
10502
 
10429
10503
  executeCommand(opts: { command: string }): Promise<any>;
10504
+
10505
+ apiDisable(): Promise<any>;
10506
+
10507
+ apiEnable(): Promise<any>;
10430
10508
  }
10431
10509
 
10432
10510
  export class ManagerUpdates extends HomeyAPIV3.ManagerUpdates {
@@ -10582,7 +10660,7 @@ export namespace HomeyAPIV3Local {
10582
10660
  opts?: object;
10583
10661
  }): Promise<any>;
10584
10662
 
10585
- flashFirmware(): Promise<any>;
10663
+ flashFirmware(opts: { erase?: string }): Promise<any>;
10586
10664
 
10587
10665
  getLog(): Promise<any>;
10588
10666
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [