@windycom/plugin-devtools 2.0.0 → 3.0.1

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 (143) 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/BottomSlide.d.ts +3 -0
  6. package/types/client/BottomSveltePlugins.d.ts +8 -0
  7. package/types/client/Calendar.d.ts +9 -17
  8. package/types/client/Color.d.ts +44 -91
  9. package/types/client/EcmwfProduct.d.ts +0 -22
  10. package/types/client/Evented.d.ts +4 -0
  11. package/types/client/ExternalSveltePlugin.d.ts +8 -2
  12. package/types/client/IDB.d.ts +69 -0
  13. package/types/client/IconProducts.d.ts +2 -0
  14. package/types/client/Layer.d.ts +1 -2
  15. package/types/client/Metric.d.ts +13 -9
  16. package/types/client/MetricClasses.d.ts +4 -3
  17. package/types/client/Overlay.d.ts +31 -16
  18. package/types/client/OverlayClasses.d.ts +11 -7
  19. package/types/client/Plugin.d.ts +6 -2
  20. package/types/client/Product.d.ts +33 -30
  21. package/types/client/RadarPlusProduct.d.ts +19 -0
  22. package/types/client/Renderer.d.ts +2 -10
  23. package/types/client/SatelliteProduct.d.ts +1 -1
  24. package/types/client/SveltePlugin.d.ts +16 -5
  25. package/types/client/TileLayer.d.ts +1 -2
  26. package/types/client/TopoMap.d.ts +10 -0
  27. package/types/client/WindowPlugin.d.ts +9 -4
  28. package/types/client/appsFlyer.d.ts +2 -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/compatibilityCheck.d.ts +1 -0
  34. package/types/client/connection.d.ts +1 -1
  35. package/types/client/customColors.d.ts +1 -0
  36. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  37. package/types/client/d.ts.files/Color.d.ts +17 -5
  38. package/types/client/d.ts.files/LabelsLayer.d.ts +3 -20
  39. package/types/client/d.ts.files/Layer.d.ts +8 -1
  40. package/types/client/d.ts.files/Metric.d.ts +1 -0
  41. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  42. package/types/client/d.ts.files/alerts.d.ts +119 -0
  43. package/types/client/d.ts.files/broadcast.d.ts +51 -18
  44. package/types/client/d.ts.files/dataSpecifications.d.ts +121 -137
  45. package/types/client/d.ts.files/favs.d.ts +68 -0
  46. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  47. package/types/client/d.ts.files/lib.d.ts +5 -7
  48. package/types/client/d.ts.files/notifications.d.ts +2 -2
  49. package/types/client/d.ts.files/plugin-params.d.ts +53 -57
  50. package/types/client/d.ts.files/plugins.d.ts +31 -42
  51. package/types/client/d.ts.files/pois.d.ts +1 -1
  52. package/types/client/d.ts.files/products.d.ts +16 -5
  53. package/types/client/d.ts.files/rootScope.d.ts +13 -31
  54. package/types/client/d.ts.files/startup.d.ts +65 -0
  55. package/types/client/d.ts.files/storage.d.ts +12 -35
  56. package/types/client/d.ts.files/user.d.ts +82 -24
  57. package/types/client/detectDevice.d.ts +0 -3
  58. package/types/client/device.d.ts +1 -0
  59. package/types/client/deviceLogging.d.ts +2 -1
  60. package/types/client/embed.d.ts +70 -0
  61. package/types/client/embed2.d.ts +14 -31
  62. package/types/client/errorLogger.d.ts +28 -3
  63. package/types/client/errors.d.ts +6 -0
  64. package/types/client/fetch.d.ts +41 -16
  65. package/types/client/format.d.ts +1 -1
  66. package/types/client/ga.d.ts +1 -1
  67. package/types/client/geolocation.d.ts +15 -7
  68. package/types/client/globals.d.ts +1 -0
  69. package/types/client/http.d.ts +17 -6
  70. package/types/client/idbInstances.d.ts +36 -0
  71. package/types/client/imaker.d.ts +112 -0
  72. package/types/client/imakerMain.d.ts +49 -0
  73. package/types/client/langFiles.d.ts +2 -0
  74. package/types/client/latestBroadcasts.d.ts +1 -1
  75. package/types/client/layers.d.ts +2 -0
  76. package/types/client/lib.d.ts +6 -22
  77. package/types/client/libHtml.d.ts +1 -1
  78. package/types/client/liveAlerts.d.ts +5 -0
  79. package/types/client/liveAlerts.types.d.ts +28 -0
  80. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  81. package/types/client/location.d.ts +5 -0
  82. package/types/client/log.d.ts +4 -1
  83. package/types/client/lruCache.d.ts +6 -0
  84. package/types/client/map.d.ts +17 -6
  85. package/types/client/mobile.d.ts +31 -22
  86. package/types/client/models.d.ts +7 -5
  87. package/types/client/notifications.d.ts +29 -67
  88. package/types/client/overlays.d.ts +4 -1
  89. package/types/client/params.d.ts +0 -1
  90. package/types/client/permanentPromos.d.ts +1 -1
  91. package/types/client/persistentStorage.d.ts +8 -0
  92. package/types/client/picker.d.ts +1 -1
  93. package/types/client/plugins.d.ts +4 -0
  94. package/types/client/pois.d.ts +1 -2
  95. package/types/client/promo.d.ts +6 -16
  96. package/types/client/pushNotifications.d.ts +1 -1
  97. package/types/client/queryString.d.ts +1 -1
  98. package/types/client/renderUtils.d.ts +1 -1
  99. package/types/client/renderers.d.ts +7 -3
  100. package/types/client/rootScope.d.ts +23 -24
  101. package/types/client/router.d.ts +9 -29
  102. package/types/client/seoParser.d.ts +0 -14
  103. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  104. package/types/client/showableErrorsService.d.ts +6 -10
  105. package/types/client/startupWeather.d.ts +13 -9
  106. package/types/client/store.d.ts +2 -2
  107. package/types/client/storeLastPosition.d.ts +4 -0
  108. package/types/client/subscription.d.ts +1 -0
  109. package/types/client/swDownloader.d.ts +7 -7
  110. package/types/client/swProxy.d.ts +1 -1
  111. package/types/client/swUtils.d.ts +3 -3
  112. package/types/client/trans.d.ts +26 -37
  113. package/types/client/user.d.ts +7 -13
  114. package/types/client/userAlerts.d.ts +68 -0
  115. package/types/client/userConsent.d.ts +6 -0
  116. package/types/client/userFavs.d.ts +46 -122
  117. package/types/client/utils.d.ts +67 -9
  118. package/types/iconfont.d.ts +8 -0
  119. package/types/interfaces.d.ts +226 -284
  120. package/types/lang-files.d.ts +1334 -142
  121. package/types/offline.d.ts +100 -0
  122. package/types/types.d.ts +108 -34
  123. package/types/client/Bar.d.ts +0 -114
  124. package/types/client/BindedBar.d.ts +0 -51
  125. package/types/client/BindedCheckbox.d.ts +0 -30
  126. package/types/client/BindedSwitch.d.ts +0 -35
  127. package/types/client/BottomTagPlugin.d.ts +0 -8
  128. package/types/client/DraggableDiv.d.ts +0 -21
  129. package/types/client/GhostBox.d.ts +0 -17
  130. package/types/client/Legend.d.ts +0 -6
  131. package/types/client/LongTap.d.ts +0 -21
  132. package/types/client/MobileCalendar.d.ts +0 -51
  133. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  134. package/types/client/ProductSwitch.d.ts +0 -14
  135. package/types/client/Scrollable.d.ts +0 -14
  136. package/types/client/Switch.d.ts +0 -24
  137. package/types/client/TimestampBar.d.ts +0 -8
  138. package/types/client/d.ts.files/Product.d.ts +0 -37
  139. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  140. package/types/client/d.ts.files/trans.d.ts +0 -55
  141. package/types/client/favs.d.ts +0 -83
  142. package/types/client/offlineController.d.ts +0 -20
  143. /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
@@ -1,41 +1,42 @@
1
1
  /**
2
2
  * Main Windy interfaces
3
3
  */
4
- import { ClientMessage } from '@plugins/offline/offline';
5
4
  import { Weekday } from '@windy/Calendar.d';
6
5
  import { ExtendedTileParams } from '@windy/DataTiler.d';
6
+ import { FavId } from '@windy/favs';
7
7
  import { FullRenderParameters } from '@windy/Layer.d';
8
8
  import { Particles } from '@windy/Particles';
9
- import { PluginsOpenParams, type PluginsQsParams } from '@windy/plugin-params.d';
9
+ import { PluginsOpenParams, PluginOpenEventSource, PluginsQsParams } from '@windy/plugin-params.d';
10
10
  import { Plugins } from '@windy/plugins.d';
11
- import { AcTimes, Isolines, Levels, Overlays, PointProducts, Products } from '@windy/rootScope.d';
11
+ import { Isolines, Levels, Overlays, PointProducts, Products } from '@windy/rootScope.d';
12
12
  import {
13
- BatteryPreferences,
14
- CapAlertInfo,
15
- CapAlertSeverity,
16
- CapAlertType,
17
- DetailDisplayType,
18
- DetailRows,
19
- Directions,
20
- FavType,
21
- GoogleServicesPreferences,
22
- GpsPreferences,
23
- ISODateString,
24
- LocationPreferences,
25
- MeteogramLayers,
26
- MeteogramLevels,
27
- NotificationPreferences,
28
- NumOrNull,
29
- NumValue,
30
- Path,
31
- Pixel,
32
- Platform,
33
- SearchType,
34
- StationOrPoiType,
35
- Timestamp,
36
- WidgetNotificationPreferences,
37
- YearMonthDay,
38
- type MigrationResult,
13
+ BatteryPreferences,
14
+ CapAlertInfo,
15
+ CapAlertSeverity,
16
+ CapAlertType,
17
+ DetailDisplayType,
18
+ DetailRows,
19
+ Directions,
20
+ GoogleServicesPreferences,
21
+ GpsPreferences,
22
+ ISODateString,
23
+ LocationPreferences,
24
+ MeteogramLayers,
25
+ MeteogramLevels,
26
+ NotificationPreferences,
27
+ NumOrNull,
28
+ NumValue,
29
+ Path,
30
+ Pixel,
31
+ Platform,
32
+ Timestamp,
33
+ WidgetNotificationPreferences,
34
+ WidgetType,
35
+ YearMonthDay,
36
+ Hours,
37
+ Minutes,
38
+ SubTier,
39
+ CustomAppIcon,
39
40
  } from '@windy/types.d';
40
41
 
41
42
  export interface ExportedObj {
@@ -117,8 +118,8 @@ export interface GeolocationInfo extends LatLon {
117
118
  * TODO: This is basically copied favorite
118
119
  */
119
120
  export interface HomeLocation extends LatLon {
121
+ id: FavId;
120
122
  title: string;
121
- updated?: string;
122
123
  }
123
124
 
124
125
  export interface Alert {
@@ -159,6 +160,7 @@ export interface Alert {
159
160
  snow: {
160
161
  active: boolean;
161
162
  min: number;
163
+ max: number;
162
164
  };
163
165
 
164
166
  /**
@@ -168,6 +170,7 @@ export interface Alert {
168
170
  rain: {
169
171
  active: boolean;
170
172
  min: number;
173
+ max: number;
171
174
  hours: 3 | 6 | 12 | 24 | 48;
172
175
  };
173
176
 
@@ -247,154 +250,12 @@ export interface AlertProps {
247
250
  suspended?: boolean;
248
251
  }
249
252
 
250
- export interface Fav extends LatLon {
251
- /** Unique ID of item */
252
- id: string;
253
-
254
- /* How many times was this item hit/used */
255
- counter?: number;
256
-
257
- /** Title of item */
258
- title: string;
259
-
260
- /** @deprecated Name was used till 2019, all should be refactored to `title` if it is safe */
261
- name?: string;
262
-
263
- /** Unique invented key, for access */
264
- key?: string;
265
-
266
- /** Type of item */
267
- type: FavType | SearchType;
268
-
269
- /** Airport ICAO code in case of airport */
270
- icao?: string;
271
-
272
- /** Weather station ID (if WX station) */
273
- stationId?: string;
274
-
275
- /** Webcam ID in case of webcam */
276
- webcamId?: number;
277
-
278
- /** For saved routes */
279
- route?: string;
280
-
281
- /**
282
- * If user wants to pin to top this fav, this timestamp enable us to sort all the favs
283
- * so the last pinned is on top
284
- */
285
- pin2top?: Timestamp | null;
286
-
287
- /**
288
- * If user wants to pin to homepage this fav, this timestamp enable us to sort all the favs
289
- * so the last pinned is first in line
290
- */
291
- pin2homepage?: Timestamp | null;
292
- }
293
-
294
- /** Search result payload as received from backend */
295
- export interface SearchResult extends Fav {
296
- /** Localized Search result */
297
- title: string;
298
-
299
- /** Type of item */
300
- type: SearchType;
301
-
302
- /** Localized, human readable country name */
303
- country?: string | null;
304
-
305
- /** Lowercase ISO-2 CC */
306
- cc?: string;
307
-
308
- /** Localized, human readable region */
309
- region?: string | null;
310
-
311
- /** Localized, human readable state */
312
- state?: string;
313
-
314
- /** Stringified bounds of found item for case of island, country etc */
315
- bounds?: string;
316
-
317
- /**
318
- * Added properties for purpose of recent searches
319
- */
320
-
321
- /** Creation date */
322
- timestamp?: Timestamp;
323
-
324
- /** Search query under which was item stored to recents */
325
- query?: string;
326
- }
327
-
328
- export interface HttpSearchPayload {
329
- header: {
330
- type: 'search' | 'coordinates' | 'query-error' | '2airports';
331
- };
332
- data: SearchResult[];
333
- }
334
-
335
- export interface SavedFav extends Fav {
336
- /** Title of item */
337
- title: string;
338
-
339
- /** Unique invented key, for access */
340
- key: string;
341
-
342
- /** Type of item */
343
- type: FavType;
344
-
345
- /** Alert settings (conditions, properties, ...) if any */
346
- alert?: Alert;
347
-
348
- /** Basic info about alert if any */
349
- alertProps?: AlertProps;
350
-
351
- /**
352
- * Query params of the route needed for creating the route again
353
- *
354
- * @example car/50.43,21.49;48.14,20.61;49.18,21.41
355
- */
356
- route?: string;
357
-
358
- /**
359
- * 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)
360
- */
361
- updated?: Timestamp;
362
-
363
- overflowed?: boolean;
364
-
365
- /** @deprecated Use `title` instead. This property is presented only because of in local storage saved old favs compatibility. */
366
- name?: string;
367
- /** Used for alerts to open slider on active timestamp */
368
- moveToTimestamp?: boolean;
369
- }
370
-
371
- export interface UpcomingFav extends Fav {
372
- // TODO - is it necessary? Isn't just some migration deprecated stuff?
373
- name?: string;
374
-
375
- /** Type of item */
376
- type: FavType;
377
-
378
- // TODO - is it necessary? Can unsaved fav has a route property?
379
- route?: string;
380
-
381
- // TODO - is it necessary? Can unsaved fav has an alert property?
382
- alert?: Alert;
383
-
384
- // TODO - is it necessary? Can unsaved fav has an updated property?
385
- updated?: Timestamp;
386
- }
387
-
388
- export interface SavedAlertFav extends UpcomingFav {
389
- _id?: string;
390
- alert: Alert;
391
- }
392
-
393
253
  export interface WeatherParameters {
254
+ acRange: Timestamp;
394
255
  overlay: Overlays;
395
- acTime: AcTimes;
396
256
  level: Levels;
397
- isolines: Isolines;
257
+ isolinesType: Isolines;
258
+ isolinesOn: boolean;
398
259
  path: Path;
399
260
  product: Products;
400
261
  }
@@ -415,6 +276,8 @@ export interface LastSentDevice {
415
276
  platform: string;
416
277
  target: string;
417
278
  version: string;
279
+ subscription: SubTier;
280
+ cc: string;
418
281
  deactivated?: boolean;
419
282
  updated?: number;
420
283
  screen?: {
@@ -459,7 +322,7 @@ export interface Celestial {
459
322
  /**
460
323
  * TZ offset in hours
461
324
  */
462
- TZoffset: number;
325
+ TZoffset: Hours;
463
326
 
464
327
  /**
465
328
  * TZ offset nicely formatted
@@ -469,7 +332,7 @@ export interface Celestial {
469
332
  /**
470
333
  * TZ offset in minutes
471
334
  */
472
- TZoffsetMin: number;
335
+ TZoffsetMin: Minutes;
473
336
 
474
337
  /**
475
338
  * Type of TZ type t..terrestrial, n..nautical
@@ -478,6 +341,7 @@ export interface Celestial {
478
341
 
479
342
  /**
480
343
  * Determines probability if the location is at sea or not as number from 1..0
344
+ * Unfortunately the number is inverted, so 1 means land, and 0 means sea
481
345
  */
482
346
  atSea: number;
483
347
 
@@ -511,7 +375,7 @@ export interface Celestial {
511
375
  /**
512
376
  * Summary day as received from backend
513
377
  */
514
- export interface SummaryDay {
378
+ export interface CalendarSummaryDay {
515
379
  /**
516
380
  * Identifier of the day
517
381
  */
@@ -522,6 +386,21 @@ export interface SummaryDay {
522
386
  */
523
387
  day: number;
524
388
 
389
+ /**
390
+ * Timestamp of midnight when the segment starts
391
+ */
392
+ timestamp: Timestamp;
393
+
394
+ /**
395
+ * Translation string for weekday
396
+ */
397
+ weekday: Weekday;
398
+ }
399
+
400
+ /**
401
+ * Summary day as received from backend
402
+ */
403
+ export interface SummaryDay extends CalendarSummaryDay {
525
404
  /**
526
405
  * Weather icon identifier
527
406
  */
@@ -547,16 +426,6 @@ export interface SummaryDay {
547
426
  */
548
427
  tempMin: NumValue;
549
428
 
550
- /**
551
- * Timestamp of midnight when the segment starts
552
- */
553
- timestamp: Timestamp;
554
-
555
- /**
556
- * Translation string for weekday
557
- */
558
- weekday: Weekday;
559
-
560
429
  /**
561
430
  * Mean/Average Wind force
562
431
  */
@@ -771,8 +640,8 @@ export type PickDataHashPropsByType<U, Strict = true> = Pick<
771
640
  : never
772
641
  : never
773
642
  : U extends DataHash[P]
774
- ? P
775
- : never;
643
+ ? P
644
+ : never;
776
645
  }[keyof DataHash]
777
646
  >;
778
647
 
@@ -875,7 +744,7 @@ export interface NodeForecastHeader {
875
744
  /**
876
745
  * Elevation of model grid
877
746
  */
878
- modelElevation: number;
747
+ modelElevation?: number;
879
748
 
880
749
  /**
881
750
  * UTC offset in hours
@@ -911,88 +780,83 @@ export interface WeatherDataPayload<T extends DataHash | SummaryDataHash> {
911
780
  now?: T extends SummaryDataHash ? WeatherDataNow : never;
912
781
  }
913
782
 
914
- /**
915
- * Minimal required options for RendererWeatherTable
916
- */
917
- export interface WeatherTableRenderingOptions {
783
+ export interface DetailExtendedLatLon extends LatLon {
918
784
  /**
919
- * How to display detail
785
+ * Optional name of the location
920
786
  */
921
- display: DetailDisplayType;
787
+ name?: string;
922
788
 
923
789
  /**
924
- * Which rows to render
790
+ * id of city label that was was clicked on (if any)
925
791
  */
926
- rows: DetailRows[];
792
+ cityLabelId?: string;
927
793
 
928
794
  /**
929
- * 1h or 3h step
795
+ * id of surf spot that was clicked on (if any)
930
796
  */
931
- step: 1 | 3;
797
+ surfSpotId?: string;
932
798
 
933
799
  /**
934
- * Width of each table cell (in pixels)
800
+ * id of pg spot that was clicked on (if any)
935
801
  */
936
- tdWidth: Pixel;
802
+ pgSpotId?: string;
937
803
 
938
804
  /**
939
- * How many days to display
805
+ * id if tide station that was clicked on (if any)
940
806
  */
941
- days: number;
807
+ tideStationId?: string;
942
808
 
943
809
  /**
944
- * Size of weather icons
810
+ * Source, which led to opening the detail
945
811
  */
946
- iconSize: Pixel;
812
+ source?: PluginOpenEventSource;
947
813
 
948
814
  /**
949
- * Array of times, when Alert was triggered
815
+ * Indicates, that the detail was just opened
950
816
  */
951
- timestamps?: null | Timestamp[];
817
+ externalOpen?: boolean;
952
818
 
953
819
  /**
954
- * Should we display detail with Z times?
820
+ * Array of timestamps, that arrived from Alert notification, that should be shown
955
821
  */
956
- zuluMode?: boolean;
822
+ timestamps?: Timestamp[] | null;
957
823
 
958
824
  /**
959
- * Shoud we display 12 or 24h format
825
+ * Timestamp to which we should scroll detail
960
826
  */
961
- is12hFormat?: boolean;
827
+ scrollToTimestamp?: Timestamp;
828
+ }
962
829
 
830
+ export type WeatherTableRenderingOptions = {
963
831
  /**
964
- * Content to put in header of legend
832
+ * Width of table element
965
833
  */
966
- legendHeaderContent?: string;
834
+ tdWidth: number;
967
835
 
968
836
  /**
969
- * Surface sea temperature if available
837
+ * Should we use 12h format for time?
970
838
  */
971
- sst?: number;
972
- }
973
-
974
- // TS cannot extend from [] syntax, just create proxy type and use it in the next line
975
- type DetailPluginOpenParams = PluginsOpenParams['detail'];
839
+ is12hFormat?: boolean;
840
+ } & Pick<DetailParams, 'display' | 'step' | 'rows' | 'days'>;
976
841
 
977
842
  /**
978
843
  * Parameters used for displaying detail (point forecast)
979
844
  */
980
- export interface DetailParams extends DetailPluginOpenParams, WeatherTableRenderingOptions {
981
- display: DetailDisplayType;
845
+ export interface DetailParams extends DetailExtendedLatLon {
982
846
  /**
983
- * Which kind of action led to displaying the detail
847
+ * Optional name of the spot
984
848
  */
985
- emitter?: 'externalOpen' | 'locationChange';
849
+ name?: string;
986
850
 
987
851
  /**
988
- * Should we display extended 10hours forecast?
852
+ * Type of display
989
853
  */
990
- extended: boolean;
854
+ display: DetailDisplayType;
991
855
 
992
856
  /**
993
- * Height of background canvas
857
+ * Should we display extended 10hours forecast?
994
858
  */
995
- height?: Pixel;
859
+ extended: boolean;
996
860
 
997
861
  /**
998
862
  * Required point product
@@ -1001,37 +865,34 @@ export interface DetailParams extends DetailPluginOpenParams, WeatherTableRender
1001
865
 
1002
866
  /**
1003
867
  * Required multiple point products
1004
- * TODO - split to more interfaces, for multimodel and others
1005
868
  */
1006
869
  models?: Products[];
1007
870
 
1008
- //source: PluginOpenEventSource;
1009
-
1010
871
  /**
1011
- * Type of POI that was clicked to open detail or was contained in URL on page load
872
+ * Always incrementing synchronization number, that enables
873
+ * to cancel async tasks, if we will have new version of params
874
+ * available
1012
875
  */
1013
- poiType?: StationOrPoiType;
876
+ syncCounter: number;
1014
877
 
1015
878
  /**
1016
- * POI id that was clicked to open detail or was contained in URL on page load
879
+ * Which rows to render
1017
880
  */
1018
- id?: string;
881
+ rows: DetailRows[];
1019
882
 
1020
883
  /**
1021
- * height of temperature background canvas
884
+ * 1h or 3h step
1022
885
  */
1023
- tempBgH?: Pixel;
886
+ step: 1 | 3;
1024
887
 
1025
888
  /**
1026
- * Always incrementing synchronization number, that enables
1027
- * to cancel async tasks, if we will have new version of params
1028
- * available
889
+ * How many days to display
1029
890
  */
1030
- syncCounter: number;
891
+ days: number;
1031
892
  }
1032
893
 
1033
894
  /**
1034
- * Multimple weather models loaded by multiLoad.ts
895
+ * Multiple weather models loaded by multiLoad.ts
1035
896
  */
1036
897
  export interface MultiLoadPayload {
1037
898
  model: PointProducts;
@@ -1070,27 +931,6 @@ export interface ExtendedRenderParams extends ExtendedTileParams, FullRenderPara
1070
931
  speed2pixel: number;
1071
932
  }
1072
933
 
1073
- /**
1074
- * Info about articles, user has already seen
1075
- */
1076
- export interface SeenArticle {
1077
- /**
1078
- * Last time, the article has been displayed to the user
1079
- */
1080
- checked: Timestamp;
1081
-
1082
- /**
1083
- * How many times the article has been seen
1084
- * (one count is added only if the article has been seen after 12 hours from the last seen time)
1085
- */
1086
- count: number;
1087
-
1088
- /**
1089
- * Marks beginning of 12h interval
1090
- */
1091
- seen: Timestamp;
1092
- }
1093
-
1094
934
  /**
1095
935
  * How good are observations by this AD or WX station?
1096
936
  */
@@ -1168,23 +1008,32 @@ export interface BillingPlugin {
1168
1008
  export interface TimeLocal {
1169
1009
  weekday: Weekday;
1170
1010
  day: string;
1171
- month: string;
1172
- year: string;
1011
+ month?: string;
1012
+ year?: string;
1173
1013
  /** '09' */
1174
1014
  hour: string;
1175
1015
  }
1176
1016
 
1177
1017
  export interface CapAlertHeadline {
1018
+ id: string;
1178
1019
  start: Timestamp;
1179
1020
  end: Timestamp;
1180
1021
  type: CapAlertType;
1181
1022
  severity: CapAlertSeverity;
1182
- headline: string;
1023
+ headline?: string;
1183
1024
  event: string;
1184
1025
  startLocal: TimeLocal;
1185
1026
  endLocal: TimeLocal;
1186
1027
  }
1187
1028
 
1029
+ export interface ExtendedCapLine extends CapAlertHeadline {
1030
+ id: string;
1031
+ startDay: string;
1032
+ endDay: string;
1033
+ shortenedEvent: string;
1034
+ color: string;
1035
+ }
1036
+
1188
1037
  export interface CapAlertData extends CapAlertHeadline {
1189
1038
  id: string;
1190
1039
  ident: string;
@@ -1302,7 +1151,51 @@ export interface WindyServicePlugin {
1302
1151
  openBackgroundLocationSettings: () => Promise<void>;
1303
1152
  logError: (arg: { moduleName: string; msg: string; error?: string }) => Promise<void>;
1304
1153
  getId: () => Promise<{ identifier: string }>;
1154
+ getAppsflyerCredentials: () => Promise<{ devKey: string | undefined; appId: string }>;
1155
+ addWidget: (arg: WidgetType) => Promise<void>;
1156
+ isGarminAppInstalled: () => Promise<{ value: boolean }>;
1157
+ setAppIcon(arg: { iconName: CustomAppIcon }): Promise<void>;
1158
+ getAppIcon(): Promise<{ iconName: CustomAppIcon | null }>;
1159
+ }
1160
+
1161
+ export interface NotificationLocationInfo {
1162
+ locationEntityId: string;
1163
+ deviceToken: string | null;
1164
+ isRunning: boolean;
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
+
1176
+ export interface WindyLocalNotificationPlugin {
1177
+ schedule: (arg: {
1178
+ title: string;
1179
+ subtitle: string | null;
1180
+ body: string;
1181
+ timeInterval: number; // in seconds
1182
+ }) => Promise<{ id: string }>; // id of the scheduled notification
1183
+ cancel: (arg: { id: string }) => Promise<void>;
1184
+ cancelAll: () => Promise<void>;
1185
+ getPending: () => Promise<{ pending: string[] }>; // array of ids of pending notifications
1186
+ registerRetentionNotification: (arg: {
1187
+ title: string;
1188
+ subtitle: string | null;
1189
+ body: string;
1190
+ marketingId: string | null; // is used for analytics
1191
+ deepLink: string | null; // deepLink to open when the notification is clicked
1192
+ showAfter: number; // in seconds
1193
+ showUntil: number; // in seconds
1194
+ }) => Promise<{ status: 'notStarted' | 'scheduled' | 'delivered' | 'opened' | 'expired' }>; // status of the registration
1195
+ sendTestRetentionNotification: () => Promise<{ id: string }>;
1196
+ resetRetentionNotification: () => Promise<void>;
1305
1197
  }
1198
+
1306
1199
  /**
1307
1200
  * A migration tool for transferring old Web View local storage to a new location.
1308
1201
  * This migration is necessary when the hostname is changed in the native Capacitor configuration.
@@ -1344,11 +1237,7 @@ export interface WindyMigrationPlugin {
1344
1237
  /**
1345
1238
  * Marks migration as completed and restart WebView from origin
1346
1239
  */
1347
- markMigrationCompleted: () => Promise<void>;
1348
- /**
1349
- * Returns migration status flag - either migrationNotPerformed or migratingData
1350
- */
1351
- getMigrationStatus: () => Promise<MigrationResult>;
1240
+ markMigrationCompleted: (opts: { reload: boolean }) => Promise<void>;
1352
1241
  /**
1353
1242
  * Sends migration data to native layer
1354
1243
  */
@@ -1494,18 +1383,6 @@ export interface LocationState {
1494
1383
  search: string;
1495
1384
  }
1496
1385
 
1497
- export interface WindyOfflinePlugin {
1498
- // startOfflineMode: () => Promise<unknown>;
1499
- // stopOfflineMode: () => Promise<unknown>;
1500
- controlReadiness: () => Promise<{ value: boolean }>;
1501
- // fetchOfflineData: (payload: DownloadPayload) => Promise<unknown>;
1502
- postMessage: (message: ClientMessage) => Promise<unknown>;
1503
- addListener: (
1504
- eventName: 'offlineMessage',
1505
- callback: (message: { data: string }) => void,
1506
- ) => void;
1507
- }
1508
-
1509
1386
  /**
1510
1387
  * # Plugin configuration
1511
1388
  *
@@ -1765,3 +1642,68 @@ interface ClientPatch {
1765
1642
  exclusivePromos: PromoObj[];
1766
1643
  otherPromos: PromoObj[];
1767
1644
  }
1645
+
1646
+ /**
1647
+ * Amount of active hurricanes as returnd from hurricane tracker backend
1648
+ */
1649
+ export interface ActiveStormCountPayload {
1650
+ activeStormCount: number;
1651
+ }
1652
+
1653
+ /**
1654
+ * Cap alert was slided from left to right on startup screen
1655
+ */
1656
+ export interface CapAlertSlided {
1657
+ id: string;
1658
+ expire: Timestamp;
1659
+ }
1660
+
1661
+ /**
1662
+ * Handy payload or reusable data that helps to render Forecast Table
1663
+ */
1664
+ export interface WeatherTableRenderingData {
1665
+ /**
1666
+ * Day identifiers, that were used in data object (above)
1667
+ */
1668
+ usedDays: YearMonthDay[];
1669
+
1670
+ /**
1671
+ * Loaded data.data (modified later by splicing data arrays)
1672
+ */
1673
+ data: DataHash;
1674
+
1675
+ /**
1676
+ * Length of used forecast as a umber of TD segments
1677
+ */
1678
+ dataLength: number;
1679
+
1680
+ /**
1681
+ * Start of timeline
1682
+ */
1683
+ start: Timestamp;
1684
+ end: Timestamp;
1685
+
1686
+ tsWidth: Timestamp;
1687
+ pxWidth: Pixel;
1688
+ px2ts: number;
1689
+
1690
+ /**
1691
+ * UTC offset in hours
1692
+ */
1693
+ utcOffset: Hours;
1694
+
1695
+ /**
1696
+ * UTC offset in minutes
1697
+ */
1698
+ utcOffsetMinutes: Minutes;
1699
+
1700
+ /**
1701
+ * Indicates that data payload has waves
1702
+ */
1703
+ hasWaves: boolean;
1704
+
1705
+ /**
1706
+ * Summary of days used
1707
+ */
1708
+ summary: Record<YearMonthDay, SummaryDay>;
1709
+ }