@windycom/plugin-devtools 1.0.9 → 3.0.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.
Files changed (134) hide show
  1. package/README.md +4 -0
  2. package/index.mjs +2 -2
  3. package/package.json +2 -3
  4. package/types/client/AccessProducts.d.ts +8 -0
  5. package/types/client/BottomSveltePlugins.d.ts +8 -0
  6. package/types/client/Calendar.d.ts +9 -17
  7. package/types/client/Color.d.ts +43 -90
  8. package/types/client/Drag.d.ts +8 -1
  9. package/types/client/Evented.d.ts +4 -0
  10. package/types/client/ExternalSveltePlugin.d.ts +2 -1
  11. package/types/client/IDB.d.ts +63 -0
  12. package/types/client/IconProducts.d.ts +2 -0
  13. package/types/client/Layer.d.ts +1 -2
  14. package/types/client/Metric.d.ts +8 -8
  15. package/types/client/MetricClasses.d.ts +4 -3
  16. package/types/client/Overlay.d.ts +30 -15
  17. package/types/client/OverlayClasses.d.ts +11 -7
  18. package/types/client/Plugin.d.ts +2 -2
  19. package/types/client/Product.d.ts +53 -30
  20. package/types/client/RadarPlusProduct.d.ts +19 -0
  21. package/types/client/Renderer.d.ts +2 -10
  22. package/types/client/SveltePanePlugin.d.ts +4 -3
  23. package/types/client/SveltePlugin.d.ts +9 -5
  24. package/types/client/TileLayer.d.ts +1 -2
  25. package/types/client/TopoMap.d.ts +10 -0
  26. package/types/client/Window.d.ts +0 -4
  27. package/types/client/WindowPlugin.d.ts +15 -10
  28. package/types/client/appsFlyer.d.ts +3 -0
  29. package/types/client/baseMap.d.ts +8 -5
  30. package/types/client/cityLabels.d.ts +10 -2
  31. package/types/client/cloudSync.d.ts +3 -1
  32. package/types/client/colorGradients.d.ts +13 -0
  33. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  34. package/types/client/d.ts.files/Color.d.ts +16 -5
  35. package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
  36. package/types/client/d.ts.files/Layer.d.ts +8 -1
  37. package/types/client/d.ts.files/Metric.d.ts +1 -0
  38. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  39. package/types/client/d.ts.files/alerts.d.ts +120 -0
  40. package/types/client/d.ts.files/broadcast.d.ts +44 -17
  41. package/types/client/d.ts.files/dataSpecifications.d.ts +94 -137
  42. package/types/client/d.ts.files/favs.d.ts +69 -0
  43. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  44. package/types/client/d.ts.files/notifications.d.ts +2 -2
  45. package/types/client/d.ts.files/plugin-params.d.ts +44 -58
  46. package/types/client/d.ts.files/plugins.d.ts +37 -52
  47. package/types/client/d.ts.files/pois.d.ts +1 -1
  48. package/types/client/d.ts.files/products.d.ts +19 -2
  49. package/types/client/d.ts.files/rootScope.d.ts +3 -21
  50. package/types/client/d.ts.files/satellite.d.ts +1 -0
  51. package/types/client/d.ts.files/startup.d.ts +59 -0
  52. package/types/client/d.ts.files/storage.d.ts +12 -35
  53. package/types/client/d.ts.files/user.d.ts +79 -24
  54. package/types/client/device.d.ts +0 -1
  55. package/types/client/deviceLogging.d.ts +2 -1
  56. package/types/client/embed2.d.ts +15 -35
  57. package/types/client/fetch.d.ts +31 -24
  58. package/types/client/ga.d.ts +4 -0
  59. package/types/client/geolocation.d.ts +14 -7
  60. package/types/client/globals.d.ts +1 -0
  61. package/types/client/http.d.ts +17 -0
  62. package/types/client/idbInstances.d.ts +45 -0
  63. package/types/client/interpolator.d.ts +2 -1
  64. package/types/client/langFiles.d.ts +2 -0
  65. package/types/client/layers.d.ts +2 -0
  66. package/types/client/lib.d.ts +7 -25
  67. package/types/client/libHtml.d.ts +1 -1
  68. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  69. package/types/client/log.d.ts +1 -0
  70. package/types/client/lruCache.d.ts +6 -0
  71. package/types/client/map.d.ts +17 -6
  72. package/types/client/mobile.d.ts +33 -27
  73. package/types/client/models.d.ts +1 -1
  74. package/types/client/nativeStorage.d.ts +0 -14
  75. package/types/client/notifications.d.ts +32 -67
  76. package/types/client/overlays.d.ts +4 -1
  77. package/types/client/params.d.ts +0 -1
  78. package/types/client/patchAndPromoCtrl.d.ts +13 -0
  79. package/types/client/permanentPromos.d.ts +1 -2
  80. package/types/client/persistentStorage.d.ts +8 -0
  81. package/types/client/picker.d.ts +1 -1
  82. package/types/client/pois.d.ts +1 -2
  83. package/types/client/promo.d.ts +16 -32
  84. package/types/client/pushNotifications.d.ts +13 -1
  85. package/types/client/queryString.d.ts +1 -1
  86. package/types/client/renderUtils.d.ts +1 -1
  87. package/types/client/renderers.d.ts +7 -3
  88. package/types/client/rootScope.d.ts +22 -27
  89. package/types/client/router.d.ts +10 -6
  90. package/types/client/seoParser.d.ts +21 -0
  91. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  92. package/types/client/startupWeather.d.ts +27 -0
  93. package/types/client/store.d.ts +2 -2
  94. package/types/client/storeLastPosition.d.ts +1 -0
  95. package/types/client/subscription.d.ts +1 -0
  96. package/types/client/swDownloader.d.ts +7 -7
  97. package/types/client/swProxy.d.ts +1 -1
  98. package/types/client/swUtils.d.ts +3 -3
  99. package/types/client/trans.d.ts +26 -37
  100. package/types/client/user.d.ts +11 -14
  101. package/types/client/userAlerts.d.ts +68 -0
  102. package/types/client/userConsent.d.ts +6 -0
  103. package/types/client/userFavs.d.ts +46 -128
  104. package/types/client/utils.d.ts +46 -10
  105. package/types/iconfont.d.ts +6 -4
  106. package/types/interfaces.d.ts +199 -348
  107. package/types/lang-files.d.ts +736 -128
  108. package/types/offline.d.ts +100 -0
  109. package/types/types.d.ts +116 -29
  110. package/types/client/Bar.d.ts +0 -114
  111. package/types/client/BindedBar.d.ts +0 -51
  112. package/types/client/BindedCheckbox.d.ts +0 -30
  113. package/types/client/BindedDropDown.d.ts +0 -14
  114. package/types/client/BindedSwitch.d.ts +0 -35
  115. package/types/client/BottomTagPlugin.d.ts +0 -8
  116. package/types/client/Detail1hCheckbox.d.ts +0 -4
  117. package/types/client/DraggableDiv.d.ts +0 -21
  118. package/types/client/DropDown.d.ts +0 -37
  119. package/types/client/GhostBox.d.ts +0 -17
  120. package/types/client/Legend.d.ts +0 -6
  121. package/types/client/LongTap.d.ts +0 -21
  122. package/types/client/MobileCalendar.d.ts +0 -47
  123. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  124. package/types/client/ProductSwitch.d.ts +0 -14
  125. package/types/client/Scrollable.d.ts +0 -14
  126. package/types/client/Switch.d.ts +0 -24
  127. package/types/client/TimestampBar.d.ts +0 -8
  128. package/types/client/Webcams.d.ts +0 -66
  129. package/types/client/d.ts.files/Product.d.ts +0 -37
  130. package/types/client/d.ts.files/trans.d.ts +0 -55
  131. package/types/client/favs.d.ts +0 -83
  132. package/types/client/hp.d.ts +0 -15
  133. package/types/client/offlineController.d.ts +0 -20
  134. /package/types/client/{loadersUI.d.ts → customColors.d.ts} +0 -0
@@ -3,19 +3,16 @@
3
3
  */
4
4
  import { Weekday } from '@windy/Calendar.d';
5
5
  import { ExtendedTileParams } from '@windy/DataTiler.d';
6
+ import { FavId } from '@windy/favs';
6
7
  import { FullRenderParameters } from '@windy/Layer.d';
7
8
  import { Particles } from '@windy/Particles';
8
- import { PluginsOpenParams, type PluginsQsParams } from '@windy/plugin-params.d';
9
- import { Plugins } from '@windy/plugins.d';
10
9
  import {
11
- AcTimes,
12
- Isolines,
13
- Levels,
14
- Overlays,
15
- PointProducts,
16
- Products,
17
- SupportedLanguages,
18
- } from '@windy/rootScope.d';
10
+ PluginsOpenParams,
11
+ type DetailOpenParams,
12
+ type PluginsQsParams,
13
+ } from '@windy/plugin-params.d';
14
+ import { Plugins } from '@windy/plugins.d';
15
+ import { Isolines, Levels, Overlays, PointProducts, Products } from '@windy/rootScope.d';
19
16
  import {
20
17
  BatteryPreferences,
21
18
  CapAlertInfo,
@@ -24,27 +21,26 @@ import {
24
21
  DetailDisplayType,
25
22
  DetailRows,
26
23
  Directions,
27
- FavType,
28
24
  GoogleServicesPreferences,
29
25
  GpsPreferences,
30
- HTMLString,
31
26
  ISODateString,
32
- LocationPrefecernces,
27
+ LocationPreferences,
33
28
  MeteogramLayers,
34
29
  MeteogramLevels,
35
- NoticicationPrefecernces,
30
+ NotificationPreferences,
36
31
  NumOrNull,
37
32
  NumValue,
38
33
  Path,
39
34
  Pixel,
40
35
  Platform,
41
- SearchType,
42
36
  StationOrPoiType,
43
37
  Timestamp,
44
38
  WidgetNotificationPreferences,
39
+ WidgetType,
45
40
  YearMonthDay,
41
+ type MigrationResult,
42
+ type SubTier,
46
43
  } from '@windy/types.d';
47
- import { ClientMessage } from '@plugins/offline/offline';
48
44
 
49
45
  export interface ExportedObj {
50
46
  default?: unknown;
@@ -125,8 +121,8 @@ export interface GeolocationInfo extends LatLon {
125
121
  * TODO: This is basically copied favorite
126
122
  */
127
123
  export interface HomeLocation extends LatLon {
124
+ id: FavId;
128
125
  title: string;
129
- updated?: string;
130
126
  }
131
127
 
132
128
  export interface Alert {
@@ -167,6 +163,7 @@ export interface Alert {
167
163
  snow: {
168
164
  active: boolean;
169
165
  min: number;
166
+ max: number;
170
167
  };
171
168
 
172
169
  /**
@@ -176,6 +173,7 @@ export interface Alert {
176
173
  rain: {
177
174
  active: boolean;
178
175
  min: number;
176
+ max: number;
179
177
  hours: 3 | 6 | 12 | 24 | 48;
180
178
  };
181
179
 
@@ -255,142 +253,12 @@ export interface AlertProps {
255
253
  suspended?: boolean;
256
254
  }
257
255
 
258
- export interface Fav extends LatLon {
259
- /** Unique ID of item */
260
- id: string;
261
-
262
- /* How many times was this item hit/used */
263
- counter?: number;
264
-
265
- /** Title of item */
266
- title: string;
267
-
268
- /** OBSOLETE DEPRACATED. Name was used till 2019, all should be refactored to `title` if it is safe */
269
- name?: string;
270
-
271
- /** Unique invented key, for access */
272
- key?: string;
273
-
274
- /** Type of item */
275
- type: FavType | SearchType;
276
-
277
- /** Airport ICAO code in case of airport */
278
- icao?: string;
279
-
280
- /** Weather station ID (if WX station) */
281
- stationId?: string;
282
-
283
- /** Webcam ID in case of webcam */
284
- webcamId?: number;
285
-
286
- /** For saved routes */
287
- route?: string;
288
- }
289
-
290
- /** Search result payload as received from backend */
291
- export interface SearchResult extends Fav {
292
- /** Localized Search result */
293
- title: string;
294
-
295
- /** Type of item */
296
- type: SearchType;
297
-
298
- /** Localized, human readable country name */
299
- country?: string | null;
300
-
301
- /** Lowercase ISO-2 CC */
302
- cc?: string;
303
-
304
- /** Localized, human readable region */
305
- region?: string | null;
306
-
307
- /** Localized, human readable state */
308
- state?: string;
309
-
310
- /** Stringified bounds of found item for case of island, country etc */
311
- bounds?: string;
312
-
313
- /**
314
- * Added properties for purpose of recent searches
315
- */
316
-
317
- /** Creation date */
318
- timestamp?: Timestamp;
319
-
320
- /** Search query under which was item stored to recents */
321
- query?: string;
322
- }
323
-
324
- export interface HttpSearchPayload {
325
- header: {
326
- type: 'search' | 'coordinates' | 'query-error' | '2airports';
327
- };
328
- data: SearchResult[];
329
- }
330
-
331
- export interface SavedFav extends Fav {
332
- /** Title of item */
333
- title: string;
334
-
335
- /** Unique invented key, for access */
336
- key: string;
337
-
338
- /** Type of item */
339
- type: FavType;
340
-
341
- /** Alert settings (conditions, properties, ...) if any */
342
- alert?: Alert;
343
-
344
- /** Basic info about alert if any */
345
- alertProps?: AlertProps;
346
-
347
- /**
348
- * Query params of the route needed for creating the route again
349
- *
350
- * @example car/50.43,21.49;48.14,20.61;49.18,21.41
351
- */
352
- route?: string;
353
-
354
- /**
355
- * Timestamp when the item has been updated for the last time. It is used for updating items on all devices (the most up-to-date wins)
356
- */
357
- updated?: Timestamp;
358
-
359
- overflowed?: boolean;
360
-
361
- /** DEPRACATED !!! Use `title` instead. This property is presented only because of in localstorage saved old favs compatibility. */
362
- name?: string;
363
- /** Used for alerts to open slider on active timestamp */
364
- moveToTimestamp?: boolean;
365
- }
366
-
367
- export interface UpcomingFav extends Fav {
368
- // TODO - is it necessary? Isn't just some migration deprecated stuff?
369
- name?: string;
370
-
371
- /** Type of item */
372
- type: FavType;
373
-
374
- // TODO - is it necessary? Can unsaved fav has a route property?
375
- route?: string;
376
-
377
- // TODO - is it necessary? Can unsaved fav has an alert property?
378
- alert?: Alert;
379
-
380
- // TODO - is it necessary? Can unsaved fav has an updated property?
381
- updated?: Timestamp;
382
- }
383
-
384
- export interface SavedAlertFav extends UpcomingFav {
385
- _id?: string;
386
- alert: Alert;
387
- }
388
-
389
256
  export interface WeatherParameters {
257
+ acRange: Timestamp;
390
258
  overlay: Overlays;
391
- acTime: AcTimes;
392
259
  level: Levels;
393
- isolines: Isolines;
260
+ isolinesType: Isolines;
261
+ isolinesOn: boolean;
394
262
  path: Path;
395
263
  product: Products;
396
264
  }
@@ -411,6 +279,8 @@ export interface LastSentDevice {
411
279
  platform: string;
412
280
  target: string;
413
281
  version: string;
282
+ subscription: SubTier;
283
+ cc: string;
414
284
  deactivated?: boolean;
415
285
  updated?: number;
416
286
  screen?: {
@@ -430,7 +300,7 @@ export interface Bounds {
430
300
  }
431
301
 
432
302
  /**
433
- * Leflet's tilePoint
303
+ * Leaflet's tilePoint
434
304
  */
435
305
  export interface TilePoint {
436
306
  x: number;
@@ -448,7 +318,7 @@ export interface Celestial {
448
318
  TZabbrev: string;
449
319
 
450
320
  /**
451
- * Time zone name (for instance 'Europe/Luxemburg)
321
+ * Time zone name (for instance 'Europe/Luxembourg)
452
322
  */
453
323
  TZname: string;
454
324
 
@@ -468,12 +338,12 @@ export interface Celestial {
468
338
  TZoffsetMin: number;
469
339
 
470
340
  /**
471
- * Type of TZ type t..terrestial, n..nautical
341
+ * Type of TZ type t..terrestrial, n..nautical
472
342
  */
473
343
  TZtype: 't' | 'n';
474
344
 
475
345
  /**
476
- * Determines propability if the location is at sea or not as number from 1..0
346
+ * Determines probability if the location is at sea or not as number from 1..0
477
347
  */
478
348
  atSea: number;
479
349
 
@@ -494,7 +364,7 @@ export interface Celestial {
494
364
  night: ISODateString;
495
365
 
496
366
  /**
497
- * Monet when, the data object was creted (for check of being obsolete)
367
+ * Monet when, the data object was created (for check of being obsolete)
498
368
  */
499
369
  nowObserved: ISODateString;
500
370
 
@@ -507,26 +377,36 @@ export interface Celestial {
507
377
  /**
508
378
  * Summary day as received from backend
509
379
  */
510
- export interface SummaryDay {
380
+ export interface CalendarSummaryDay {
511
381
  /**
512
382
  * Identifier of the day
513
383
  */
514
384
  date: YearMonthDay;
515
385
 
516
386
  /**
517
- * Day of the molnth (starting with 1)
387
+ * Day of the month (starting with 1)
518
388
  */
519
389
  day: number;
520
390
 
521
391
  /**
522
- * Weather icon identifier (legacy version)
392
+ * Timestamp of midnight when the segment starts
523
393
  */
524
- icon: number;
394
+ timestamp: Timestamp;
395
+
396
+ /**
397
+ * Translation string for weekday
398
+ */
399
+ weekday: Weekday;
400
+ }
525
401
 
402
+ /**
403
+ * Summary day as received from backend
404
+ */
405
+ export interface SummaryDay extends CalendarSummaryDay {
526
406
  /**
527
407
  * Weather icon identifier
528
408
  */
529
- icon2: number;
409
+ icon: number;
530
410
 
531
411
  /**
532
412
  * At which index, in the data table, the day starts
@@ -548,16 +428,6 @@ export interface SummaryDay {
548
428
  */
549
429
  tempMin: NumValue;
550
430
 
551
- /**
552
- * Timestamp of midnight when the segment starts
553
- */
554
- timestamp: Timestamp;
555
-
556
- /**
557
- * Translation string for weekday
558
- */
559
- weekday: Weekday;
560
-
561
431
  /**
562
432
  * Mean/Average Wind force
563
433
  */
@@ -569,9 +439,15 @@ export interface SummaryDay {
569
439
  windDir: NumValue;
570
440
 
571
441
  /**
572
- * CAP Alert warning identifier as teo letter designstor
442
+ * CAP Alert warning identifier as two letter designator
573
443
  */
574
444
  warning?: string;
445
+
446
+ /**
447
+ * Indicates that these data are fake, just for purpose to
448
+ * show non-premium users how the extended fcst looks like
449
+ */
450
+ isFake?: boolean;
575
451
  }
576
452
 
577
453
  /**
@@ -584,7 +460,7 @@ export interface SummaryDataHash {
584
460
  mm: NumValue[];
585
461
 
586
462
  /**
587
- * Is the preciptitaion in a form fo snow?
463
+ * Is the precipitation in a form fo snow?
588
464
  */
589
465
  snow: (1 | 0)[];
590
466
 
@@ -636,31 +512,16 @@ export interface DataHash extends SummaryDataHash, IsDay {
636
512
  */
637
513
  hour: number[];
638
514
 
639
- /**
640
- * Weather icon identifier (legacy version)
641
- */
642
- icon: number[];
643
-
644
515
  /**
645
516
  * Weather icon identifier
646
517
  */
647
- icon2: number[];
518
+ icon: number[];
648
519
 
649
520
  /**
650
521
  * Moon phase icon identifier
651
522
  */
652
523
  moonPhase: number[];
653
524
 
654
- /**
655
- * Date of segment beggining
656
- */
657
- origDate: ISODateString[];
658
-
659
- /**
660
- * TS of segment beggining (seems same as ts)
661
- */
662
- origTs: Timestamp[];
663
-
664
525
  /**
665
526
  * ?????
666
527
  */
@@ -756,6 +617,11 @@ export interface DataHash extends SummaryDataHash, IsDay {
756
617
 
757
618
  turbulence?: NumValue[];
758
619
  icing?: NumValue[];
620
+
621
+ /**
622
+ * Indicates, that these data are fake, just for purpose to show non-premium users how the extended fcst looks like
623
+ */
624
+ isFake?: boolean[];
759
625
  }
760
626
 
761
627
  /**
@@ -763,7 +629,7 @@ export interface DataHash extends SummaryDataHash, IsDay {
763
629
  * Strict means the extension has to be from both sides.
764
630
  *
765
631
  * @example
766
- * PickDataHashPropsByType<string[]> = { date: ..., origDate: ..., weathercode: ... };
632
+ * PickDataHashPropsByType<string[]> = { date: ..., weathercode: ... };
767
633
  * PickDataHashPropsByType<string, false> even with `warnings`, because the could be undefined and undefined does not extend number[]
768
634
  */
769
635
  export type PickDataHashPropsByType<U, Strict = true> = Pick<
@@ -808,7 +674,7 @@ export interface NodeForecastHeader {
808
674
  /**
809
675
  * Number of available days in forecast
810
676
  */
811
- daysAvail?: number;
677
+ daysAvail: number;
812
678
 
813
679
  /**
814
680
  * Served model
@@ -880,7 +746,7 @@ export interface NodeForecastHeader {
880
746
  /**
881
747
  * Elevation of model grid
882
748
  */
883
- modelElevation: number;
749
+ modelElevation?: number;
884
750
 
885
751
  /**
886
752
  * UTC offset in hours
@@ -893,6 +759,18 @@ export interface NodeForecastHeader {
893
759
  sst?: number;
894
760
  }
895
761
 
762
+ /**
763
+ * Forecasted weather data for NOW
764
+ */
765
+
766
+ export interface WeatherDataNow {
767
+ icon: number;
768
+ temp: NumValue;
769
+ wind: NumValue;
770
+ windDir: NumValue;
771
+ moonPhase: NumValue;
772
+ }
773
+
896
774
  /**
897
775
  * Weather data or Summary Weather data JSON as received from node-forecast
898
776
  */
@@ -901,19 +779,11 @@ export interface WeatherDataPayload<T extends DataHash | SummaryDataHash> {
901
779
  celestial: Celestial;
902
780
  summary: Record<YearMonthDay, SummaryDay>;
903
781
  data: T;
904
- now?: T extends SummaryDataHash
905
- ? {
906
- icon: number;
907
- temp: NumValue;
908
- wind: NumValue;
909
- windDir: NumValue;
910
- moonPhase: NumValue;
911
- }
912
- : never;
782
+ now?: T extends SummaryDataHash ? WeatherDataNow : never;
913
783
  }
914
784
 
915
785
  /**
916
- * Minimsl rqrd options for RendererWeatherTable
786
+ * Minimal required options for RendererWeatherTable
917
787
  */
918
788
  export interface WeatherTableRenderingOptions {
919
789
  /**
@@ -970,15 +840,17 @@ export interface WeatherTableRenderingOptions {
970
840
  * Surface sea temperature if available
971
841
  */
972
842
  sst?: number;
973
- }
974
843
 
975
- // TS cannot extend from [] syntax, just create proxy type and use it in the next line
976
- type DetailPluginOpenParams = PluginsOpenParams['detail'];
844
+ /**
845
+ * Should backend interpolate values for 1h step
846
+ */
847
+ interpolate?: boolean;
848
+ }
977
849
 
978
850
  /**
979
- * Parametrs used for displaying detail (poinr forecast)
851
+ * Parameters used for displaying detail (point forecast)
980
852
  */
981
- export interface DetailParams extends DetailPluginOpenParams, WeatherTableRenderingOptions {
853
+ export interface DetailParams extends DetailOpenParams, WeatherTableRenderingOptions {
982
854
  display: DetailDisplayType;
983
855
  /**
984
856
  * Which kind of action led to displaying the detail
@@ -1019,12 +891,12 @@ export interface DetailParams extends DetailPluginOpenParams, WeatherTableRender
1019
891
  id?: string;
1020
892
 
1021
893
  /**
1022
- * height of temperature bacground canvas
894
+ * height of temperature background canvas
1023
895
  */
1024
896
  tempBgH?: Pixel;
1025
897
 
1026
898
  /**
1027
- * Always incrementing synchornization number, that enables
899
+ * Always incrementing synchronization number, that enables
1028
900
  * to cancel async tasks, if we will have new version of params
1029
901
  * available
1030
902
  */
@@ -1053,7 +925,7 @@ export interface MeteogramDataPayload {
1053
925
  }
1054
926
 
1055
927
  /**
1056
- * Particle animation paramters
928
+ * Particle animation parameters
1057
929
  */
1058
930
  export interface ExtendedRenderParams extends ExtendedTileParams, FullRenderParameters {
1059
931
  canvas: HTMLCanvasElement;
@@ -1071,15 +943,6 @@ export interface ExtendedRenderParams extends ExtendedTileParams, FullRenderPara
1071
943
  speed2pixel: number;
1072
944
  }
1073
945
 
1074
- /**
1075
- * Info about articles, user has already seen
1076
- */
1077
- export interface SeenArticle {
1078
- seen: Timestamp;
1079
- checked: Timestamp;
1080
- count: number;
1081
- }
1082
-
1083
946
  /**
1084
947
  * How good are observations by this AD or WX station?
1085
948
  */
@@ -1090,102 +953,6 @@ export interface ObservationInfo {
1090
953
  records: number;
1091
954
  }
1092
955
 
1093
- export type ArticleImportances =
1094
- | 'extreme'
1095
- | 'severe'
1096
- | 'moderate'
1097
- | 'windyAnnounce'
1098
- | 'forecast'
1099
- | 'windyTutorial'
1100
- | 'educational'
1101
- | 'timeKilling'
1102
- | 'warning';
1103
-
1104
- export interface ArticleAuthor {
1105
- avatar: string;
1106
- profile: string;
1107
- reputation: number;
1108
- username: string;
1109
- userslug: string;
1110
- }
1111
-
1112
- /**
1113
- * This format is used backend payload for info on HP
1114
- */
1115
- export interface ArticleJson {
1116
- author: ArticleAuthor;
1117
- coverPhoto: {
1118
- desc: '' | string;
1119
- link: '' | string;
1120
- photo: '' | string;
1121
- showArticleCover: boolean;
1122
- src: string;
1123
- };
1124
- id: number;
1125
- importance: ArticleImportances;
1126
- language: SupportedLanguages;
1127
- ranking: number;
1128
- slug: string;
1129
- subtitle: '' | string;
1130
- title: string;
1131
- updated: ISODateString;
1132
-
1133
- /**
1134
- * Monkey patched props
1135
- */
1136
- count: number;
1137
- checked: Timestamp | 0;
1138
- key: string;
1139
- }
1140
-
1141
- /**
1142
- * This format is used backend payload for list of articles
1143
- */
1144
- export interface ExtendedArticleJson extends ArticleJson {
1145
- countries: string | string[] | '';
1146
- licence: 'cc-by' | 'proprietary';
1147
- originalAuthor: {
1148
- name: string | '';
1149
- link: string | '';
1150
- };
1151
- perex: string | '';
1152
- platform: 'all' | 'ios' | 'android';
1153
- target: 'all' | 'index' | 'mobile';
1154
- device: 'all' | 'desktop' | 'mobile';
1155
- pid: number;
1156
- published: ISODateString;
1157
- expire: string;
1158
- publishedBy: number;
1159
- tags: string[];
1160
- expiration: ISODateString;
1161
- homepage: boolean;
1162
- type?: 'article' | 'video';
1163
- }
1164
-
1165
- /**
1166
- * This format is used backend payload for particular article in article list
1167
- */
1168
- export interface Article extends ExtendedArticleJson {
1169
- status: 'published' | 'unpublished' | 'expired';
1170
- upvotes: number;
1171
- viewcount: number;
1172
- internalUrl: {
1173
- url: string;
1174
- search: string;
1175
- path: string;
1176
- internal: boolean;
1177
- }[];
1178
- containsTwitter: boolean;
1179
- video?: string;
1180
- articleCoverPhoto: {
1181
- src: string;
1182
- photo: string;
1183
- desc: string;
1184
- link: string;
1185
- };
1186
- content: HTMLString;
1187
- version: string;
1188
- }
1189
956
  export interface ServiceGeoipResponse {
1190
957
  country: string;
1191
958
  region: `${number}`;
@@ -1198,7 +965,7 @@ export interface ServiceGeoipResponse {
1198
965
  ip: string;
1199
966
 
1200
967
  /**
1201
- * Deprecated
968
+ * @deprecated
1202
969
  */
1203
970
  hash: 'oiurouoweruouoiuou';
1204
971
  }
@@ -1348,7 +1115,7 @@ export interface IsAppleWatchPairedResult {
1348
1115
  value: boolean;
1349
1116
  }
1350
1117
 
1351
- export interface IsAppleWatchCompanionAppIntalledResult {
1118
+ export interface IsAppleWatchCompanionAppInstalledResult {
1352
1119
  value: boolean;
1353
1120
  }
1354
1121
 
@@ -1368,14 +1135,14 @@ export interface WindyWatchPlugin {
1368
1135
  * Watch conditions for the alert
1369
1136
  */
1370
1137
  isPaired: () => Promise<IsAppleWatchPairedResult>;
1371
- isWatchAppInstalled: () => Promise<IsAppleWatchCompanionAppIntalledResult>;
1138
+ isWatchAppInstalled: () => Promise<IsAppleWatchCompanionAppInstalledResult>;
1372
1139
  addWatchFace: () => Promise<unknown>;
1373
1140
  }
1374
1141
 
1375
1142
  export interface WindyServicePlugin {
1376
1143
  openSettings: () => Promise<void | string>;
1377
- getLocationPermnissions: () => Promise<LocationPrefecernces>;
1378
- getNotificationPermnissions: () => Promise<NoticicationPrefecernces>;
1144
+ getLocationPermissions: () => Promise<LocationPreferences>;
1145
+ getNotificationPermissions: () => Promise<NotificationPreferences>;
1379
1146
  openApplicationSettings: () => Promise<void | string>;
1380
1147
  isGpsEnabled: () => Promise<GpsPreferences>;
1381
1148
  getBatteryUsagePermissions: () => Promise<BatteryPreferences>;
@@ -1385,7 +1152,27 @@ export interface WindyServicePlugin {
1385
1152
  openWidgetNotificationSettings: () => Promise<void>;
1386
1153
  getBackgroundLocationPermission: () => Promise<GpsPreferences>;
1387
1154
  openBackgroundLocationSettings: () => Promise<void>;
1155
+ logError: (arg: { moduleName: string; msg: string; error?: string }) => Promise<void>;
1156
+ getId: () => Promise<{ identifier: string }>;
1157
+ getAppsflyerCredentials: () => Promise<{ devKey: string | undefined; appId: string }>;
1158
+ addWidget: (arg: WidgetType) => Promise<void>;
1159
+ }
1160
+
1161
+ export interface NotificationLocationInfo {
1162
+ locationEntityId: string;
1163
+ deviceToken: string | null;
1164
+ isRunning: boolean;
1388
1165
  }
1166
+
1167
+ export interface WindyNotificationLocationPlugin {
1168
+ getInfo: () => Promise<NotificationLocationInfo>;
1169
+ startUpdateService: () => Promise<NotificationLocationInfo>;
1170
+ stopUpdateService: () => Promise<NotificationLocationInfo>;
1171
+ // Only for testing purposes
1172
+ getDebugLog: () => Promise<{ lastLocationUpdates: string }>;
1173
+ useCustomLocation: (arg: LatLon) => Promise<void>;
1174
+ }
1175
+
1389
1176
  /**
1390
1177
  * A migration tool for transferring old Web View local storage to a new location.
1391
1178
  * This migration is necessary when the hostname is changed in the native Capacitor configuration.
@@ -1427,7 +1214,19 @@ export interface WindyMigrationPlugin {
1427
1214
  /**
1428
1215
  * Marks migration as completed and restart WebView from origin
1429
1216
  */
1430
- markMigrationCompleted: () => Promise<void>;
1217
+ markMigrationCompleted: (opts: { reload: boolean }) => Promise<void>;
1218
+ /**
1219
+ * Returns migration status flag - either migrationNotPerformed or migratingData
1220
+ */
1221
+ getMigrationStatus: () => Promise<MigrationResult>;
1222
+ /**
1223
+ * Sends migration data to native layer
1224
+ */
1225
+ setMigrationData: (opts: { data: string }) => Promise<void>;
1226
+ /**
1227
+ * Returns old localStorage data (sent to native layer via setMigrationData function)
1228
+ */
1229
+ getOldLocalStorageDataAndroid: () => Promise<{ result: string | null }>;
1431
1230
  }
1432
1231
 
1433
1232
  export interface SocialLoginParams {
@@ -1458,25 +1257,12 @@ export interface ObservationSummaryRecord {
1458
1257
 
1459
1258
  export type ObservationSummaryHash = Record<YearMonthDay, ObservationSummaryRecord>;
1460
1259
 
1461
- /**
1462
- * Observation Weather data used in station plugin (so far IMHO used only to render mobile fragment)
1463
- */
1464
- export interface ObservationFragmentHash {
1465
- summary: ObservationSummaryHash;
1466
- data: {
1467
- temp: NumOrNull[];
1468
- wind: NumOrNull[];
1469
- mm: NumOrNull[];
1470
- snow: NumOrNull[];
1471
- };
1472
- }
1473
-
1474
1260
  /**
1475
1261
  * Opening options for Window class
1476
1262
  */
1477
1263
  export interface WindowOpeningOptions {
1478
1264
  /**
1479
- * Should we open the widnow without animation?
1265
+ * Should we open the window without animation?
1480
1266
  */
1481
1267
  disableOpeningAnimation?: boolean;
1482
1268
  }
@@ -1578,18 +1364,6 @@ export interface LocationState {
1578
1364
  search: string;
1579
1365
  }
1580
1366
 
1581
- export interface WindyOfflinePlugin {
1582
- // startOfflineMode: () => Promise<unknown>;
1583
- // stopOfflineMode: () => Promise<unknown>;
1584
- controlReadiness: () => Promise<{ value: boolean }>;
1585
- // fetchOfflineData: (payload: DownloadPayload) => Promise<unknown>;
1586
- postMessage: (message: ClientMessage) => Promise<unknown>;
1587
- addListener: (
1588
- eventName: 'offlineMessage',
1589
- callback: (message: { data: string }) => void,
1590
- ) => void;
1591
- }
1592
-
1593
1367
  /**
1594
1368
  * # Plugin configuration
1595
1369
  *
@@ -1735,6 +1509,12 @@ export interface ExternalPluginConfig {
1735
1509
  * space on the bottom of the screen.
1736
1510
  */
1737
1511
  mobileUI: 'fullscreen' | 'small';
1512
+
1513
+ /**
1514
+ * The plugin has NO LINK in the main menu, can be open only programmatically
1515
+ * and its installation is not persistent.
1516
+ */
1517
+ internal?: boolean;
1738
1518
  }
1739
1519
 
1740
1520
  export interface CompiledExternalPluginConfig extends ExternalPluginConfig {
@@ -1765,17 +1545,88 @@ export interface CompiledExternalPluginConfig extends ExternalPluginConfig {
1765
1545
  */
1766
1546
  export interface InstalledExternalPluginConfig extends CompiledExternalPluginConfig {
1767
1547
  /**
1768
- * URL of the plguin is used as unique identifier
1548
+ * URL of the plugin is used as unique identifier
1769
1549
  */
1770
1550
  url: string;
1771
1551
 
1772
1552
  /**
1773
1553
  * From which process was plugin installed
1774
1554
  */
1775
- installedBy: 'dev' | 'gallery' | 'url';
1555
+ installedBy: 'dev' | 'gallery' | 'url' | 'patch';
1776
1556
 
1777
1557
  /**
1778
1558
  * When was this plugin installed by specific user
1779
1559
  */
1780
1560
  installed: Timestamp;
1781
1561
  }
1562
+
1563
+ interface PromoFilteringParams {
1564
+ isLoggedIn: boolean;
1565
+ sessionCounter: number;
1566
+ isPremium: boolean;
1567
+ }
1568
+
1569
+ /**
1570
+ * Main promo object, used in `client-patch`
1571
+ */
1572
+ interface PromoObj {
1573
+ /**
1574
+ * Main ID of the promo. This key is also used in `promo` object in localStorage
1575
+ */
1576
+ readonly id: string;
1577
+
1578
+ /**
1579
+ * ISO date, when the promo expires
1580
+ */
1581
+ readonly end: string;
1582
+
1583
+ /**
1584
+ * How many times display promo to the user (respective on one device)
1585
+ */
1586
+ counter: number;
1587
+
1588
+ /**
1589
+ * How often to display promo on particular device (in ms)
1590
+ */
1591
+ delay: number;
1592
+
1593
+ /**
1594
+ * Any others filters, deciding whether to display promo or not
1595
+ */
1596
+ filter: () => boolean;
1597
+
1598
+ /**
1599
+ * Should we display HP articles together with promo
1600
+ * @deprecated
1601
+ */
1602
+ loadArticles?: boolean;
1603
+
1604
+ /**
1605
+ * Required method to be run, when promo is executed. In this stage we can also
1606
+ * do some additional checks, if promo should be displayed or not, so we must
1607
+ * call `promo.hitCounter()` method ourselves.
1608
+ */
1609
+ readonly run: () => void;
1610
+
1611
+ /**
1612
+ * Optional HTML code to be used internally in `run` method
1613
+ */
1614
+ html?: string;
1615
+ }
1616
+
1617
+ /**
1618
+ * Client patch object
1619
+ */
1620
+ interface ClientPatch {
1621
+ __version: string;
1622
+ __css: string;
1623
+ exclusivePromos: PromoObj[];
1624
+ otherPromos: PromoObj[];
1625
+ }
1626
+
1627
+ /**
1628
+ * Amount of active hurricanes as returnd from hurricane tracker backend
1629
+ */
1630
+ export interface ActiveStormCountPayload {
1631
+ activeStormCount: number;
1632
+ }