@windycom/plugin-devtools 1.0.4 → 1.0.5

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 (65) hide show
  1. package/README.md +2 -1
  2. package/package.json +1 -1
  3. package/types/client/Calendar.d.ts +4 -4
  4. package/types/client/Color.d.ts +3 -3
  5. package/types/client/DataTiler.d.ts +2 -2
  6. package/types/client/GlObj.d.ts +1 -1
  7. package/types/client/Layer.d.ts +11 -11
  8. package/types/client/Metric.d.ts +5 -5
  9. package/types/client/Product.d.ts +6 -6
  10. package/types/client/Renderer.d.ts +4 -4
  11. package/types/client/Webcams.d.ts +4 -4
  12. package/types/client/d.ts.files/Calendar.d.ts +87 -0
  13. package/types/client/d.ts.files/CanvasLayer.d.ts +70 -0
  14. package/types/client/d.ts.files/Color.d.ts +82 -0
  15. package/types/client/d.ts.files/DataTiler.d.ts +45 -0
  16. package/types/client/d.ts.files/GlObj.d.ts +92 -0
  17. package/types/client/d.ts.files/LabelsLayer.d.ts +51 -0
  18. package/types/client/d.ts.files/LandMask.d.ts +17 -0
  19. package/types/client/d.ts.files/Layer.d.ts +184 -0
  20. package/types/client/d.ts.files/Metric.d.ts +192 -0
  21. package/types/client/d.ts.files/PoisOverlay.d.ts +27 -0
  22. package/types/client/d.ts.files/Product.d.ts +37 -0
  23. package/types/client/d.ts.files/Renderer.d.ts +23 -0
  24. package/types/client/d.ts.files/TileLayerCanvas.d.ts +78 -0
  25. package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +13 -0
  26. package/types/client/d.ts.files/Webcams.d.ts +160 -0
  27. package/types/client/d.ts.files/broadcast.d.ts +177 -0
  28. package/types/client/d.ts.files/dataSpecifications.d.ts +943 -0
  29. package/types/client/d.ts.files/errorLogger.d.ts +35 -0
  30. package/types/client/d.ts.files/format.d.ts +48 -0
  31. package/types/client/d.ts.files/http.d.ts +87 -0
  32. package/types/client/d.ts.files/incomingMessages.d.ts +88 -0
  33. package/types/client/d.ts.files/lib.d.ts +74 -0
  34. package/types/client/d.ts.files/notifications.d.ts +39 -0
  35. package/types/client/d.ts.files/outgoingMessages.d.ts +75 -0
  36. package/types/client/d.ts.files/plugin-params.d.ts +236 -0
  37. package/types/client/d.ts.files/plugins.d.ts +132 -0
  38. package/types/client/d.ts.files/pois.d.ts +11 -0
  39. package/types/client/d.ts.files/products.d.ts +44 -0
  40. package/types/client/d.ts.files/rootScope.d.ts +43 -0
  41. package/types/client/d.ts.files/satellite.d.ts +50 -0
  42. package/types/client/d.ts.files/singleclick.d.ts +31 -0
  43. package/types/client/d.ts.files/storage.d.ts +120 -0
  44. package/types/client/d.ts.files/store.d.ts +61 -0
  45. package/types/client/d.ts.files/tileInterpolator.d.ts +35 -0
  46. package/types/client/d.ts.files/trans.d.ts +55 -0
  47. package/types/client/d.ts.files/user.d.ts +58 -0
  48. package/types/client/dataSpecifications.d.ts +1 -1
  49. package/types/client/embed2.d.ts +3 -4
  50. package/types/client/errorLogger.d.ts +1 -1
  51. package/types/client/fetch.d.ts +30 -3
  52. package/types/client/format.d.ts +2 -2
  53. package/types/client/http.d.ts +1 -1
  54. package/types/client/notifications.d.ts +2 -2
  55. package/types/client/plugins.d.ts +1 -1
  56. package/types/client/pois.d.ts +1 -1
  57. package/types/client/products.d.ts +1 -1
  58. package/types/client/rootScope.d.ts +4 -4
  59. package/types/client/singleclick.d.ts +2 -2
  60. package/types/client/storage.d.ts +1 -1
  61. package/types/client/store.d.ts +2 -2
  62. package/types/client/tileInterpolator.d.ts +3 -3
  63. package/types/client/trans.d.ts +3 -3
  64. package/types/client/user.d.ts +3 -3
  65. package/types/client/utils.d.ts +1 -1
@@ -0,0 +1,943 @@
1
+ import {
2
+ AcTimes,
3
+ GlobalPointProducts,
4
+ Isolines,
5
+ Levels,
6
+ LocalPointProducts,
7
+ Overlays,
8
+ Pois,
9
+ Products,
10
+ SupportedLanguages,
11
+ type PointProducts,
12
+ } from '@windy/rootScope.d';
13
+
14
+ import {
15
+ Consent,
16
+ GeolocationInfo,
17
+ HomeLocation,
18
+ LatLon,
19
+ InstalledExternalPluginConfig,
20
+ } from '@windy/interfaces.d';
21
+
22
+ import {
23
+ MenuItems,
24
+ Path,
25
+ PickerMobileTimeout,
26
+ ShowableError,
27
+ SubTier,
28
+ Timestamp,
29
+ type RouteMotionSpeed,
30
+ } from '@windy/types.d';
31
+
32
+ import { ColorGradient } from '@windy/Color.d';
33
+
34
+ import { MetricItem } from '@windy/Metric.d';
35
+
36
+ import type { DownloadedInfo, OfflineConfiguration } from '@plugins/offline/offline.d';
37
+ import type RadarCalendar from '@plugins/_radar/calendar/RadarCalendar';
38
+ import type SatelliteCalendar from '@plugins/satellite/calendar/SatelliteCalendar';
39
+ import type { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
40
+
41
+ /**
42
+ * Custom animation particles settings
43
+ */
44
+ export interface CustomParticles {
45
+ multiplier: number;
46
+ velocity: number;
47
+ width: number;
48
+ blending: number;
49
+ opacity: number;
50
+ }
51
+
52
+ /**
53
+ * Notification preferences
54
+ */
55
+ export interface NotificationPreferences {
56
+ email?: string;
57
+ sendToEmail: boolean;
58
+ sendToMobile: boolean;
59
+ }
60
+
61
+ /**
62
+ * # ReverseResult
63
+ *
64
+ * Result of reverse geocoding method.
65
+ */
66
+ export interface ReverseResult extends LatLon {
67
+ lang: string;
68
+ region?: string;
69
+ country?: string;
70
+ name: string;
71
+ nameValid?: boolean;
72
+ }
73
+
74
+ export interface Donation {
75
+ ts: Timestamp;
76
+ amount: number;
77
+ sub: string;
78
+ }
79
+
80
+ export interface User {
81
+ avatar?: string;
82
+ email?: string;
83
+ fullname?: string;
84
+ id: number;
85
+ username: string;
86
+ userslug: string;
87
+ verifiedEmail?: string;
88
+
89
+ /**
90
+ * Based on user location, cookie consent can be shown to the user if needed
91
+ */
92
+ requiresCookieConsent?: boolean;
93
+ }
94
+
95
+ export interface MapCoordinates extends LatLon {
96
+ source: 'maps' | 'globe';
97
+ zoom: number;
98
+ }
99
+
100
+ /**
101
+ * Main data structure used in dataStore
102
+ */
103
+ export interface DataSpecificationsObject<T> {
104
+ /**
105
+ * Default value
106
+ */
107
+ def: T;
108
+
109
+ /**
110
+ * Allowed settings (can be string, array or function returning true/false )
111
+ */
112
+ allowed: Readonly<T[]> | ((d: T) => boolean);
113
+
114
+ /**
115
+ * Peristent item. Save this item to localStorage
116
+ */
117
+ save?: boolean;
118
+
119
+ /**
120
+ * Sync this item with cloud
121
+ */
122
+ sync?: boolean;
123
+
124
+ /**
125
+ * Store the value to native iOS/Android mobile app stores
126
+ */
127
+ nativeSync?: boolean;
128
+
129
+ /**
130
+ * If false iOS/Android will set this value if exist,
131
+ * and value will not be stored if is null or undefined
132
+ */
133
+ nativeCloudSync?: boolean;
134
+
135
+ /**
136
+ * If this is true, the value is sent to the Watch.
137
+ * Now only works for iOS and Apple Watch
138
+ * Note: The implementation for the key/value sent
139
+ * needs to be done on the native site too
140
+ */
141
+ watchSync?: boolean;
142
+
143
+ /**
144
+ * Validity compare function
145
+ */
146
+ compare?: <K = T>(obj: K | K[], obj2?: K | K[]) => boolean;
147
+
148
+ /**
149
+ * Timestamp of last item update
150
+ */
151
+ update?: Timestamp;
152
+
153
+ /**
154
+ * Allow overwrite start-up URL
155
+ * TODO: Refactor. Used only once in router.ts
156
+ */
157
+ allowUrlRewrite?: boolean;
158
+
159
+ /**
160
+ * Setter function (will be run before value is set)
161
+ */
162
+ syncSet?: (...args: unknown[]) => T;
163
+
164
+ /**
165
+ * Setter function - asynchronous (will be run before value is set)
166
+ */
167
+ asyncSet?: (...args: unknown[]) => Promise<T>;
168
+ }
169
+
170
+ /**
171
+ * # Properties used in @windy/store
172
+ *
173
+ * Allowed properties, that can be used in `@windy/store` methods.
174
+ *
175
+ * Some of the major items you could be interested in are:
176
+ * `overlay`,
177
+ * `level`,
178
+ * `availLevels`,
179
+ * `acTime`,
180
+ * `timestamp`,
181
+ * `isolines`,
182
+ * `product`,
183
+ * `particlesAnim`,
184
+ * `hourFormat`
185
+ */
186
+ export interface DataSpecifications {
187
+ /**
188
+ * Color weather overlay, actually displayed on Windy.com.
189
+ *
190
+ * Can be also used to change overlay by
191
+ * calling for example `store.set('overlay', 'gust')` or `store.set('overlay', 'rain')`
192
+ *
193
+ * Use `store.getAllowed('overlay')` to get list of allowed values.
194
+ */
195
+ overlay: DataSpecificationsObject<Overlays>;
196
+
197
+ /**
198
+ * Level used for actually displayed overlay or isolines.
199
+ *
200
+ * Can be also used to change level by calling for example
201
+ * `store.set('level', 'surface')` or `store.set('level', '500h')`
202
+ *
203
+ * To get list of available levels for current combination
204
+ * of overlay and data provider use `store.get('availLevels')`
205
+ */
206
+ level: DataSpecificationsObject<Levels>;
207
+
208
+ /**
209
+ * Rain/snow accumulated time range. Use `store.getAllowed('acTime')` to get list of allowed values.
210
+ */
211
+ acTime: DataSpecificationsObject<AcTimes>;
212
+
213
+ /**
214
+ * Timestamp of actual weather moment. Use freely and without hesitation. Must be valid timestamp in ms, that is
215
+ * in the range of current dataset
216
+ *
217
+ * @example
218
+ * ```js
219
+ * var fiveHours = 5 * 60 * 60 * 1000
220
+ * store.set('timestamp', Date.now() + fiveHours )
221
+ * ```
222
+ */
223
+ timestamp: DataSpecificationsObject<Timestamp>;
224
+
225
+ /**
226
+ * Read only value! UTC string containing time of actually rendered data that are available for current overlay and weather model.
227
+ * @ignore
228
+ */
229
+ path: DataSpecificationsObject<Path>;
230
+
231
+ /**
232
+ * Read only value! UTC string containing time of actually rendered data that are available for current overlay and weather model.
233
+ */
234
+ isolines: DataSpecificationsObject<Isolines>;
235
+
236
+ /**
237
+ * Product is set of weather data, that have same resolution, boundaries, time range and so on.
238
+ * For simplification, you can think of product as a weather model.
239
+ * Use `store.getAllowed('product')` to get list of allowed values.
240
+ */
241
+ product: DataSpecificationsObject<Products>;
242
+
243
+ /**
244
+ * Available product for selected `overlay`
245
+ */
246
+ availProducts: DataSpecificationsObject<Products[]>;
247
+
248
+ /**
249
+ * Products available for given map boundary
250
+ */
251
+ visibleProducts: DataSpecificationsObject<Products[]>;
252
+
253
+ /**
254
+ * Available accumulation times for give overlay and product combination
255
+ */
256
+ availAcTimes: DataSpecificationsObject<AcTimes[]>;
257
+
258
+ /**
259
+ * Global fallback product that handles situation
260
+ * when user pans the map out of bounds of local
261
+ * model. Preferred model must have also second wave
262
+ * mode like 'ecmwf' 👉🏻 'ecmwfWaves'
263
+ */
264
+ prefferedProduct: DataSpecificationsObject<'ecmwf' | 'gfs' | 'icon' | 'iconEu'>;
265
+
266
+ /**
267
+ * If timeline animation is running
268
+ */
269
+ animation: DataSpecificationsObject<boolean>;
270
+
271
+ /**
272
+ * Actual calendar (instance of `Calendar`) for selected overlay/product (if it has calendar)
273
+ */
274
+ calendar: DataSpecificationsObject<import('@windy/Calendar').Calendar | null>;
275
+
276
+ /**
277
+ * List of levels, that are available for current combination of product and overlay.
278
+ */
279
+ availLevels: DataSpecificationsObject<Levels[]>;
280
+
281
+ /**
282
+ * Animation of wind/waves particles over the map. Set value to `on`, or `off` if you wan to hide or show them.
283
+ */
284
+ particlesAnim: DataSpecificationsObject<'on' | 'off' | 'intensive'>;
285
+
286
+ /**
287
+ * Last modified timestamp of just rendered data (read only)
288
+ */
289
+ lastModified: DataSpecificationsObject<Timestamp>;
290
+
291
+ /**
292
+ * Display graticule over the map
293
+ */
294
+ graticule: DataSpecificationsObject<boolean>;
295
+
296
+ /**
297
+ * Display lat/lon on picker
298
+ */
299
+ latlon: DataSpecificationsObject<boolean>;
300
+
301
+ /**
302
+ * Desired language for Windy. By default is determined by user's browser setting and set to `auto`.
303
+ * Use `store.getAllowed('lang')` to get list of avail langs defined in `supportedLanguages.
304
+ */
305
+ lang: DataSpecificationsObject<SupportedLanguages | 'auto'>;
306
+
307
+ /**
308
+ * Show english map labels instead of localized labels
309
+ */
310
+ englishLabels: DataSpecificationsObject<boolean>;
311
+
312
+ /**
313
+ * Display directions in Weather picker as number or as a string (for example NW).
314
+ */
315
+ numDirection: DataSpecificationsObject<boolean>;
316
+
317
+ /**
318
+ * Time format, Set it to `12h` or `24h`.
319
+ */
320
+ hourFormat: DataSpecificationsObject<'12h' | '24h'>;
321
+
322
+ /**
323
+ * 2 letter lowercase Country Code
324
+ */
325
+ country: DataSpecificationsObject<string>;
326
+
327
+ /**
328
+ * Is imperial as default settings (computed property)
329
+ */
330
+ isImperial: DataSpecificationsObject<boolean>;
331
+
332
+ /**
333
+ * Type of map shown in detail
334
+ */
335
+ map: DataSpecificationsObject<'sznmap' | 'sat' | 'winter'>;
336
+
337
+ /**
338
+ * Show 7 days weather on startup
339
+ */
340
+ showWeather: DataSpecificationsObject<boolean>;
341
+
342
+ /**
343
+ * Is WebGL disabled?
344
+ */
345
+ disableWebGL: DataSpecificationsObject<boolean>;
346
+
347
+ /**
348
+ * Indicates whether glParticles are on or off
349
+ */
350
+ glParticlesOn: DataSpecificationsObject<boolean>;
351
+
352
+ /**
353
+ * Finally used language (the onw which is succesfully loaded in trans module)
354
+ */
355
+ usedLang: DataSpecificationsObject<SupportedLanguages>;
356
+
357
+ /**
358
+ * Particles animation settings
359
+ */
360
+ particles: DataSpecificationsObject<CustomParticles>;
361
+
362
+ /**
363
+ * Type of startup & location
364
+ */
365
+ startUp: DataSpecificationsObject<'ip' | 'gps' | 'location' | 'last'>;
366
+
367
+ /**
368
+ * Last coords to use in startup
369
+ */
370
+ startUpLastPosition: DataSpecificationsObject<MapCoordinates>;
371
+
372
+ /**
373
+ * Last product to use in startup
374
+ */
375
+ startUpLastProduct: DataSpecificationsObject<Products | null>;
376
+
377
+ /**
378
+ * User selected home location
379
+ */
380
+ homeLocation: DataSpecificationsObject<HomeLocation | null>;
381
+
382
+ /**
383
+ * User selected overlay/model
384
+ */
385
+ startUpOverlay: DataSpecificationsObject<Overlays>;
386
+
387
+ /**
388
+ * If true, every overlay change is stored as startUpOverlay
389
+ */
390
+ startUpLastOverlay: DataSpecificationsObject<boolean>;
391
+
392
+ /**
393
+ * Save forecast resolution step to be used at startup.
394
+ * 1: 1h step
395
+ * 3: 3h step
396
+ */
397
+ startUpLastStep: DataSpecificationsObject<1 | 3 | null>;
398
+
399
+ /**
400
+ * Last defined IP/GPS location
401
+ */
402
+ ipLocation: DataSpecificationsObject<GeolocationInfo | null>;
403
+
404
+ /**
405
+ * Latest received GPS location
406
+ */
407
+ gpsLocation: DataSpecificationsObject<GeolocationInfo | null>;
408
+
409
+ /**
410
+ * Geo reverse name for purpose of startup location
411
+ */
412
+ startupReverseName: DataSpecificationsObject<ReverseResult | null>;
413
+
414
+ /**
415
+ * NOTAMs marked as read
416
+ */
417
+ notams: DataSpecificationsObject<Record<string, number> | null>;
418
+
419
+ /**
420
+ * Users email
421
+ */
422
+ email: DataSpecificationsObject<string>;
423
+
424
+ /**
425
+ * METARs in raw mode
426
+ */
427
+ metarsRAW: DataSpecificationsObject<boolean>;
428
+
429
+ /**
430
+ * Display Heliports that do not report METARs in the POIs layer
431
+ */
432
+ displayHeliports: DataSpecificationsObject<boolean>;
433
+
434
+ /**
435
+ * User statistics
436
+ * @ignore
437
+ */
438
+ sessionCounter: DataSpecificationsObject<number>;
439
+
440
+ /**
441
+ * User statistics
442
+ * @ignore
443
+ */
444
+ firstUserSession: DataSpecificationsObject<Timestamp>;
445
+
446
+ /**
447
+ * Have seen info about low reliability of webGL
448
+ * @ignore
449
+ */
450
+ seenRadarInfo: DataSpecificationsObject<boolean>;
451
+
452
+ /**
453
+ * Wheather picker was dragged or not (not settings but info)
454
+ * @ignore
455
+ */
456
+ wasDragged: DataSpecificationsObject<boolean>;
457
+
458
+ /**
459
+ * Detail's location - TODO: get rid of async name property
460
+ * @ignore
461
+ */
462
+ detailLocation: DataSpecificationsObject<(LatLon & { name?: string }) | null>;
463
+
464
+ /**
465
+ * 1h step of forecast
466
+ */
467
+ detail1h: DataSpecificationsObject<boolean>;
468
+
469
+ /**
470
+ * Timestamp of detail's progress bar or middleFrame
471
+ */
472
+ detailTimestamp: DataSpecificationsObject<Timestamp>;
473
+
474
+ /**
475
+ * display webcams on daylight
476
+ */
477
+ webcamsDaylight: DataSpecificationsObject<boolean>;
478
+
479
+ /**
480
+ * display previews of webcams on the map
481
+ */
482
+ camsPreviews: DataSpecificationsObject<boolean>;
483
+
484
+ //
485
+ // CAP alerts
486
+ //
487
+
488
+ /**
489
+ * Today, tomm, later
490
+ */
491
+ capDisplay: DataSpecificationsObject<'all' | 'today' | 'tomm' | 'later'>;
492
+
493
+ /**
494
+ * Range in hours
495
+ */
496
+ radarRange: DataSpecificationsObject<'-12' | '-6' | '-1' | '0'>;
497
+
498
+ /**
499
+ * Timestamp in ms
500
+ */
501
+ radarTimestamp: DataSpecificationsObject<Timestamp>;
502
+
503
+ /**
504
+ * Animation speed
505
+ */
506
+ radarSpeed: DataSpecificationsObject<'slow' | 'medium' | 'fast'>;
507
+
508
+ /**
509
+ * Radar calendar
510
+ */
511
+ radarCalendar: DataSpecificationsObject<RadarCalendar | null>;
512
+
513
+ /**
514
+ * Animation is running
515
+ */
516
+ radarAnimation: DataSpecificationsObject<boolean>;
517
+
518
+ /**
519
+ * Visible lightning data on radar
520
+ */
521
+ blitzOn: DataSpecificationsObject<boolean>;
522
+
523
+ /**
524
+ * Sound for lightning flash effect on radar
525
+ */
526
+ blitzSoundOn: DataSpecificationsObject<boolean>;
527
+
528
+ /**
529
+ * Range of displayed satellite history
530
+ */
531
+ satelliteRange: DataSpecificationsObject<'archive' | 'long' | 'medium' | 'short'>;
532
+
533
+ /**
534
+ * Timestamp in ms
535
+ */
536
+ satelliteTimestamp: DataSpecificationsObject<Timestamp>;
537
+
538
+ /**
539
+ * Satellite calendar
540
+ */
541
+ satelliteCalendar: DataSpecificationsObject<SatelliteCalendar | null>;
542
+
543
+ /**
544
+ * Satellite animation is running
545
+ */
546
+ satelliteAnimation: DataSpecificationsObject<boolean>;
547
+
548
+ /**
549
+ * Satellite visualization modes
550
+ */
551
+ satelliteMode: DataSpecificationsObject<'BLUE' | 'VISIR' | 'IRBT' | 'DBG'>; // 'IR',
552
+
553
+ /**
554
+ * Animation speed
555
+ */
556
+ satelliteSpeed: DataSpecificationsObject<'slow' | 'medium' | 'fast'>;
557
+
558
+ /**
559
+ * Interpolate images using vectors
560
+ */
561
+ satelliteFlowOn: DataSpecificationsObject<boolean>;
562
+
563
+ /**
564
+ * Extrapolate satellite images to future
565
+ */
566
+ satelliteExtraOn: DataSpecificationsObject<boolean>;
567
+
568
+ /**
569
+ * this override is needed for video capture
570
+ */
571
+ satelliteInterpolationOverride: DataSpecificationsObject<boolean>;
572
+
573
+ /**
574
+ * Satellite/Radar archive on
575
+ */
576
+ archiveOn: DataSpecificationsObject<boolean>;
577
+
578
+ /**
579
+ * Timestamp in ms
580
+ */
581
+ archiveTimestamp: DataSpecificationsObject<Timestamp>;
582
+
583
+ /**
584
+ * Archive time range in hours
585
+ */
586
+ archiveRange: DataSpecificationsObject<number>;
587
+
588
+ /**
589
+ * Information, if startup weather box (call ad hp, homepage)
590
+ * is shown or not
591
+ */
592
+ hpShown: DataSpecificationsObject<boolean>;
593
+
594
+ /**
595
+ * pois layer that user selected
596
+ *
597
+ * IMPORTANT: Only user can willingly set his poi layer via
598
+ * clicking on poi control.
599
+ *
600
+ * Plugins and any other parts oc client code can set only
601
+ * `poisTemporary` that has limited lifespan
602
+ */
603
+ pois: DataSpecificationsObject<Pois>;
604
+
605
+ /**
606
+ * pois layer that was automatically activated by some plugin
607
+ * or any part of the code.
608
+ *
609
+ * Remember to unset the value to `empty` when closing plugin.
610
+ */
611
+ poisTemporary: DataSpecificationsObject<Pois>;
612
+
613
+ /**
614
+ * Favourite pois
615
+ */
616
+ favPois: DataSpecificationsObject<Pois[]>;
617
+
618
+ /**
619
+ * Visibility of window/tab
620
+ */
621
+ visibility: DataSpecificationsObject<boolean>;
622
+
623
+ /**
624
+ * If user wants to display his location
625
+ * @ignore
626
+ */
627
+ displayLocation: DataSpecificationsObject<boolean>;
628
+
629
+ /**
630
+ * Vibration allowed
631
+ * @ignore
632
+ */
633
+ vibrate: DataSpecificationsObject<boolean>;
634
+
635
+ /**
636
+ * Donated amounts in 2019
637
+ * [ { ts, amount, sub }, {}, {}, {} ... ]
638
+ * @ignore
639
+ */
640
+ donations: DataSpecificationsObject<Donation[]>;
641
+
642
+ /**
643
+ * Display all times in UTC
644
+ */
645
+ zuluMode: DataSpecificationsObject<boolean>;
646
+
647
+ /**
648
+ * Sorting of nearest weater stations
649
+ * @ignore
650
+ */
651
+ stationsSort: DataSpecificationsObject<'profi' | 'distance'>;
652
+
653
+ /**
654
+ * Which model to compare with in stations detail
655
+ * @ignore
656
+ */
657
+ stationCompareModel: DataSpecificationsObject<
658
+ LocalPointProducts | GlobalPointProducts | 'noModel'
659
+ >;
660
+
661
+ /**
662
+ * Type of subscription
663
+ * @ignore
664
+ */
665
+ subscription: DataSpecificationsObject<SubTier>;
666
+
667
+ /**
668
+ * Detail info about current subscription (if any)
669
+ * @ignore
670
+ */
671
+ subscriptionInfo: DataSpecificationsObject<SubscriptionInfo | null>;
672
+
673
+ /**
674
+ * Unredeemed subscription id
675
+ * @ignore
676
+ */
677
+ pendingSubscription: DataSpecificationsObject<string | null>;
678
+
679
+ /**
680
+ * Failed subscription payment payload
681
+ * @ignore
682
+ */
683
+ failedSubscriptionPayment: DataSpecificationsObject<string | null>;
684
+
685
+ /**
686
+ * Notification preferences
687
+ * @ignore
688
+ */
689
+ notifications: DataSpecificationsObject<NotificationPreferences | null>;
690
+
691
+ /**
692
+ * User likes to receive ad hoc pushNotification
693
+ * For instance METAR update.
694
+ * Once set, it always stays on on this device
695
+ * @ignore
696
+ */
697
+ adHocNotification: DataSpecificationsObject<boolean>;
698
+
699
+ /**
700
+ * Number of unread notifications
701
+ * @ignore
702
+ */
703
+ badgeNumber: DataSpecificationsObject<number>;
704
+
705
+ /**
706
+ * Major object holding user info
707
+ * { username, avatar, userslug, email }
708
+ * @ignore
709
+ */
710
+ user: DataSpecificationsObject<User | null>;
711
+
712
+ /**
713
+ * Lazy loaded user JWT containing aut hash
714
+ * Used in http requests requiring authentication as in Accept header from mobile.
715
+ * @ignore
716
+ */
717
+ userToken: DataSpecificationsObject<string | null>;
718
+
719
+ /**
720
+ * Store for error during social login
721
+ * @ignore
722
+ */
723
+ socialError: DataSpecificationsObject<string | null>;
724
+
725
+ /**
726
+ * authHash containing token with user session on mobile devices
727
+ * Used in http requests requiring authentication as in Accept header from mobile.
728
+ * Historically saved via storage
729
+ * @ignore
730
+ */
731
+ authHash: DataSpecificationsObject<string | null>;
732
+
733
+ /**
734
+ * Globe plugin is active (used for disabling isolines in overlays plugin)
735
+ */
736
+ globeActive: DataSpecificationsObject<boolean>;
737
+
738
+ /**
739
+ * Webcam or station last location (used for globe picker initial location)
740
+ * @ignore
741
+ */
742
+ lastPoiLocation: DataSpecificationsObject<(LatLon & { type?: string }) | null>;
743
+
744
+ /**
745
+ * Picker last location
746
+ */
747
+ pickerLocation: DataSpecificationsObject<LatLon | null>;
748
+
749
+ /**
750
+ * Latest maps/globe coordinates
751
+ * @ignore
752
+ */
753
+ mapCoords: DataSpecificationsObject<MapCoordinates | null>;
754
+
755
+ /**
756
+ * Whether app has been launched from some source which requires different init state
757
+ * @ignore
758
+ */
759
+ launchedBy: DataSpecificationsObject<'radar-widget' | null>;
760
+
761
+ /**
762
+ * Any stored color
763
+ * @ignore
764
+ */
765
+ [key: `color2_${string}`]: DataSpecificationsObject<ColorGradient | null>;
766
+
767
+ /**
768
+ * Any stored metric
769
+ * @ignore
770
+ */
771
+ [key: `metric_${string}`]: DataSpecificationsObject<MetricItem | null>;
772
+
773
+ /**
774
+ * User is article publisher (dynamically created property in plugin article-publisher)
775
+ * @ignore
776
+ */
777
+ userIsPublisher: DataSpecificationsObject<boolean>;
778
+
779
+ /** @ignore */
780
+ rplannerDir: DataSpecificationsObject<'horizontal' | 'vertical' | 'north'>;
781
+
782
+ /** @ignore */
783
+ rplannerMotionSpeed: DataSpecificationsObject<RouteMotionSpeed>;
784
+
785
+ /** @ignore */
786
+ soundingIsSkewTlogP: DataSpecificationsObject<boolean>;
787
+
788
+ /** @ignore */
789
+ // soundingCondensationLevel: DataSpecificationsObject<'ccl' | 'lcl'>;
790
+
791
+ /** @ignore */
792
+ unresolvedErrors: DataSpecificationsObject<ShowableError[]>;
793
+
794
+ /** @ignore */
795
+ closedErrors: DataSpecificationsObject<string[]>;
796
+
797
+ /** @ignore */
798
+ showDailyNotifications: DataSpecificationsObject<boolean>;
799
+
800
+ /** @ignore */
801
+ appReviewPluginShown: DataSpecificationsObject<number | null>;
802
+
803
+ /** @ignore */
804
+ systemAppReviewDialogShown: DataSpecificationsObject<number | null>;
805
+
806
+ /** @ignore */
807
+ appReviewLastVersion: DataSpecificationsObject<string | null>;
808
+
809
+ appReviewDialogLeaveForLater: DataSpecificationsObject<boolean>;
810
+
811
+ skipAppReviewNecessaryConditions: DataSpecificationsObject<boolean>;
812
+
813
+ /**
814
+ * Favourite overlays on mobile devices
815
+ * @ignore
816
+ */
817
+ favOverlaysMobile: DataSpecificationsObject<Overlays[]>;
818
+
819
+ /**
820
+ * Favourite overlays on desktop devices
821
+ * @ignore
822
+ */
823
+ favOverlaysDesktop: DataSpecificationsObject<Overlays[]>;
824
+
825
+ /**
826
+ * Favorite POIs on mobile devices
827
+ */
828
+ favPoisMobile: DataSpecificationsObject<Pois[]>;
829
+
830
+ /**
831
+ * Last selected filter in mobile menu
832
+ */
833
+ mobileMenuFilter: DataSpecificationsObject<MenuItems>;
834
+
835
+ /**
836
+ * Signals if user is currently online or offline, meaning that
837
+ * he has real internet connection
838
+ */
839
+ connection: DataSpecificationsObject<boolean>;
840
+
841
+ /**
842
+ * How long should picker-mobile stay open after user interaction
843
+ */
844
+ pickerMobileTimeout: DataSpecificationsObject<PickerMobileTimeout>;
845
+
846
+ /**
847
+ * Selected area and layers for offline mode
848
+ * @ignore
849
+ */
850
+ offlineSetting: DataSpecificationsObject<OfflineConfiguration | null>;
851
+
852
+ /**
853
+ * Endable/dissable change of detail location, when map is dragged
854
+ */
855
+ changeDetailOnMapDrag: DataSpecificationsObject<boolean>;
856
+
857
+ /**
858
+ * Simple, easy to use indicator, if we are running in offline mode
859
+ * @ignore
860
+ */
861
+ offlineMode: DataSpecificationsObject<boolean>;
862
+
863
+ /**
864
+ * Imfo about offline data residing in serviceWorker
865
+ * @ignore
866
+ */
867
+ offlineDataInfo: DataSpecificationsObject<DownloadedInfo | null>;
868
+
869
+ /**
870
+ * Enables/disables offline mode at all. If false, offline mode is not available
871
+ * and serviceWorker is not installed at all
872
+ * @ignore
873
+ */
874
+ offlineModeEnabled: DataSpecificationsObject<boolean>;
875
+
876
+ /**
877
+ * Display this type of WX stations on POI map
878
+ * @ignore
879
+ */
880
+ displayAdStations: DataSpecificationsObject<boolean>;
881
+
882
+ /** @ignore */
883
+ displayWMOStations: DataSpecificationsObject<boolean>;
884
+
885
+ /** @ignore */
886
+ displayMadisPWStations: DataSpecificationsObject<boolean>;
887
+
888
+ /** @ignore */
889
+ displayShipStations: DataSpecificationsObject<boolean>;
890
+
891
+ /**
892
+ * List of products that users do NOT want to see in the weather station
893
+ * compare mode
894
+ */
895
+ stationCompareHiddenProducts: DataSpecificationsObject<PointProducts[]>;
896
+
897
+ /**
898
+ * Main GSPR, privacy or cookie consent object
899
+ * @ignore
900
+ */
901
+ consent: DataSpecificationsObject<Consent | null>;
902
+
903
+ /**
904
+ * Youtube cookie consent object
905
+ * @ignore
906
+ */
907
+ youtubeConsent: DataSpecificationsObject<Omit<Consent, 'analytics'> | null>;
908
+
909
+ /**
910
+ * Twitter cookie consent object
911
+ * @ignore
912
+ */
913
+ twitterConsent: DataSpecificationsObject<Omit<Consent, 'analytics'> | null>;
914
+
915
+ /**
916
+ * List of installed external plugins
917
+ * @ignore
918
+ */
919
+ installedPlugins: DataSpecificationsObject<InstalledExternalPluginConfig[]>;
920
+ }
921
+
922
+ /**
923
+ * It picks all properties from DS which extends type passed to U parameter.
924
+ * Strict means the extension has to be from both sides.
925
+ *
926
+ * @example
927
+ * PickDataSpecificationPropsByType<Calendar> = {}; // because it is strict, and all Calendar properties can be also `null`
928
+ * PickDataSpecificationPropsByType<Calendar, false> = { calendar: ..., radarCalendar: ..., satelliteCalendar: ... }
929
+ */
930
+ export type PickDataSpecificationPropsByType<U, Strict = true> = Pick<
931
+ DataSpecifications,
932
+ {
933
+ [P in keyof DataSpecifications]: Strict extends true
934
+ ? DataSpecifications[P]['def'] extends U
935
+ ? U extends DataSpecifications[P]['def']
936
+ ? P
937
+ : never
938
+ : never
939
+ : U extends DataSpecifications[P]['def']
940
+ ? P
941
+ : never;
942
+ }[keyof DataSpecifications]
943
+ >;