@windycom/plugin-devtools 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/types/client/Calendar.d.ts +101 -71
  4. package/types/client/Color.d.ts +18 -5
  5. package/types/client/DataTiler.d.ts +1 -1
  6. package/types/client/EcmwfProduct.d.ts +22 -0
  7. package/types/client/IDB.d.ts +1 -1
  8. package/types/client/Layer.d.ts +95 -26
  9. package/types/client/LayerClasses.d.ts +5 -0
  10. package/types/client/Metric.d.ts +31 -46
  11. package/types/client/Overlay.d.ts +8 -11
  12. package/types/client/OverlayClasses.d.ts +8 -0
  13. package/types/client/Particles.d.ts +1 -1
  14. package/types/client/Product.d.ts +31 -65
  15. package/types/client/ProductClasses.d.ts +44 -0
  16. package/types/client/RadarPlusProduct.d.ts +1 -1
  17. package/types/client/Renderer.d.ts +41 -13
  18. package/types/client/SatelliteProduct.d.ts +1 -1
  19. package/types/client/SveltePlugin.d.ts +1 -1
  20. package/types/client/TileLayer.d.ts +2 -2
  21. package/types/client/TopoMap.d.ts +2 -3
  22. package/types/client/WindowPlugin.d.ts +6 -3
  23. package/types/client/appsFlyer.d.ts +2 -1
  24. package/types/client/colorGradients.d.ts +5 -10
  25. package/types/client/colors.d.ts +1 -2
  26. package/types/client/d.ts.files/Metric.d.ts +21 -2
  27. package/types/client/d.ts.files/TileLayerCanvas.d.ts +3 -3
  28. package/types/client/d.ts.files/alerts.d.ts +1 -0
  29. package/types/client/d.ts.files/broadcast.d.ts +3 -3
  30. package/types/client/d.ts.files/dataSpecifications.d.ts +32 -34
  31. package/types/client/d.ts.files/favs.d.ts +7 -18
  32. package/types/client/d.ts.files/http.d.ts +5 -0
  33. package/types/client/d.ts.files/lib.d.ts +0 -1
  34. package/types/client/d.ts.files/plugin-params.d.ts +20 -16
  35. package/types/client/d.ts.files/plugins.d.ts +0 -2
  36. package/types/client/d.ts.files/rootScope.d.ts +2 -0
  37. package/types/client/d.ts.files/webcams.d.ts +9 -2
  38. package/types/client/dataLoader.d.ts +2 -2
  39. package/types/client/detectDevice.d.ts +3 -0
  40. package/types/client/embed.d.ts +0 -2
  41. package/types/client/errorLogger.d.ts +1 -1
  42. package/types/client/externalPlugins.d.ts +2 -0
  43. package/types/client/fetch.d.ts +28 -4
  44. package/types/client/format.d.ts +1 -0
  45. package/types/client/glTileRender.d.ts +1 -7
  46. package/types/client/idbInstances.d.ts +115 -4
  47. package/types/client/layers.d.ts +3 -1
  48. package/types/client/legends.d.ts +1 -1
  49. package/types/client/lib.d.ts +0 -7
  50. package/types/client/map.d.ts +7 -1
  51. package/types/client/mobile.d.ts +0 -7
  52. package/types/client/models.d.ts +2 -6
  53. package/types/client/overlays.d.ts +2 -1
  54. package/types/client/particleRenderers.d.ts +1 -1
  55. package/types/client/plugins.d.ts +0 -4
  56. package/types/client/products.d.ts +54 -2
  57. package/types/client/promo.d.ts +28 -5
  58. package/types/client/pushNotifications.d.ts +19 -1
  59. package/types/client/renderCtrl.d.ts +1 -1
  60. package/types/client/renderTile.d.ts +2 -2
  61. package/types/client/renderUtils.d.ts +16 -36
  62. package/types/client/renderers.d.ts +2 -4
  63. package/types/client/reverseName.d.ts +2 -1
  64. package/types/client/rhMessage.d.ts +1 -1
  65. package/types/client/rootScope.d.ts +14 -6
  66. package/types/client/router.d.ts +36 -9
  67. package/types/client/seoParser.d.ts +35 -0
  68. package/types/client/showableErrorsService.d.ts +10 -6
  69. package/types/client/store.d.ts +20 -52
  70. package/types/client/tileInterpolator.d.ts +1 -1
  71. package/types/client/userAlerts.d.ts +0 -4
  72. package/types/client/userFavs.d.ts +23 -10
  73. package/types/client/utils.d.ts +18 -17
  74. package/types/interfaces.d.ts +197 -16
  75. package/types/lang-files.d.ts +167 -27
  76. package/types/types.d.ts +297 -7
  77. package/types/client/d.ts.files/Calendar.d.ts +0 -96
  78. package/types/client/d.ts.files/Color.d.ts +0 -94
  79. package/types/client/d.ts.files/Layer.d.ts +0 -191
  80. package/types/client/d.ts.files/Renderer.d.ts +0 -44
  81. package/types/client/d.ts.files/products.d.ts +0 -60
  82. package/types/client/imaker.d.ts +0 -112
  83. package/types/offline.d.ts +0 -100
package/types/types.d.ts CHANGED
@@ -11,19 +11,20 @@ export * from '@windy/interpolatorTypes.d';
11
11
  export type ISODateString = string;
12
12
 
13
13
  /**
14
- * Timestamp or any time duration in ms
14
+ * Point in time expressed as milliseconds since Unix epoch (Date.now()).
15
+ * Use {@link TimeRangeMs} instead for durations/interval lengths.
15
16
  */
16
17
  export type Timestamp = number;
17
18
 
18
19
  /**
19
- * Path in a form of YYYY/MM/DD/HH or YYYYMMDDHH based on minifest/calendar version
20
+ * Time range / duration in milliseconds (NOT an absolute epoch timestamp)
20
21
  */
21
- export type Path = string;
22
+ export type TimeRangeMs = number;
22
23
 
23
24
  /**
24
- * String in a form YYYYMMDDHH
25
+ * Path in a form of YYYYMMDDHH based on minifest/calendar version
25
26
  */
26
- export type YYYYMMDDHH = string;
27
+ export type Path = string;
27
28
 
28
29
  /**
29
30
  * Valid subscription tiers
@@ -34,7 +35,7 @@ export type Platform = 'android' | 'ios' | 'desktop';
34
35
 
35
36
  export type Device = 'mobile' | 'tablet' | 'desktop';
36
37
 
37
- export type DetailDisplayType = 'table' | 'meteogram' | 'airgram' | 'waves' | 'wind';
38
+ export type DetailDisplayType = 'table' | 'meteogram' | 'airgram' | 'waves' | 'wind' | 'airq';
38
39
 
39
40
  export type Directions = 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW';
40
41
 
@@ -267,6 +268,7 @@ export type PickerMobileTimeout = '3' | '6' | '9' | '12' | 'always';
267
268
  */
268
269
  export type LogPaths =
269
270
  | keyof WeatherParameters
271
+ | 'path'
270
272
  | 'version'
271
273
  | 'plugin'
272
274
  | 'pois'
@@ -295,7 +297,9 @@ export type LogEvents =
295
297
  | 'user-logged'
296
298
  | 'click-on-hp'
297
299
  | 'article-event'
298
- | 'displayed-on-hp';
300
+ | 'displayed-on-hp'
301
+ | 'subs-opened'
302
+ | 'subs-purchased';
299
303
 
300
304
  /**
301
305
  * Type of user consent
@@ -393,6 +397,11 @@ export type Hours = number;
393
397
 
394
398
  export type Minutes = number;
395
399
 
400
+ /**
401
+ * Time defined in seconds
402
+ */
403
+ export type Seconds = number;
404
+
396
405
  /**
397
406
  * All defined translation keys
398
407
  *
@@ -411,10 +420,36 @@ export type UserInterest =
411
420
  | 'meteorologist'
412
421
  | 'other';
413
422
 
423
+ export type ParticlesIdent = 'wind' | 'waves' | 'currents';
424
+
425
+ export type PatternType = 'cclPattern' | 'rainPattern' | 'ptypePattern';
426
+
427
+ export type TransformFunction = (x: NumValue) => NumValue;
428
+
429
+ export type RenderChannels = 'R' | 'RG' | 'B';
430
+
414
431
  export type ParsedQueryString = Record<string, string | undefined>;
415
432
 
416
433
  export type Size = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' | 'ultra';
417
434
 
435
+ export type RGBA = [number, number, number, number];
436
+
437
+ export type YUVA = [number, number, number, number];
438
+
439
+ export type ColorGradient = [NumValue, RGBA][];
440
+
441
+ export type ColorGradientString = [NumValue, RGBString | RGBAString][];
442
+
443
+ /**
444
+ * 'rgb(200,0,150)'
445
+ */
446
+ export type RGBString = `rgb(${number},${number},${number})`;
447
+
448
+ /**
449
+ * 'rgba(200,0,150,1)'
450
+ */
451
+ export type RGBAString = `rgba(${number},${number},${number},${number})`;
452
+
418
453
  /**
419
454
  * Custom app icon for Premium users
420
455
  */
@@ -434,3 +469,258 @@ export type CustomAppIcon =
434
469
  | 'wind'
435
470
  | 'windsurfing'
436
471
  | 'winter-sports';
472
+
473
+ /**
474
+ * All ISO 3166-1 alpha-2 country codes (current), lowercase.
475
+ * TODO: Later on properly type all the country codes in the codebase, where we uae string now
476
+ */
477
+ export type ISOCountryCode =
478
+ | 'ad'
479
+ | 'ae'
480
+ | 'af'
481
+ | 'ag'
482
+ | 'ai'
483
+ | 'al'
484
+ | 'am'
485
+ | 'ao'
486
+ | 'aq'
487
+ | 'ar'
488
+ | 'as'
489
+ | 'at'
490
+ | 'au'
491
+ | 'aw'
492
+ | 'ax'
493
+ | 'az'
494
+ | 'ba'
495
+ | 'bb'
496
+ | 'bd'
497
+ | 'be'
498
+ | 'bf'
499
+ | 'bg'
500
+ | 'bh'
501
+ | 'bi'
502
+ | 'bj'
503
+ | 'bl'
504
+ | 'bm'
505
+ | 'bn'
506
+ | 'bo'
507
+ | 'bq'
508
+ | 'br'
509
+ | 'bs'
510
+ | 'bt'
511
+ | 'bv'
512
+ | 'bw'
513
+ | 'by'
514
+ | 'bz'
515
+ | 'ca'
516
+ | 'cc'
517
+ | 'cd'
518
+ | 'cf'
519
+ | 'cg'
520
+ | 'ch'
521
+ | 'ci'
522
+ | 'ck'
523
+ | 'cl'
524
+ | 'cm'
525
+ | 'cn'
526
+ | 'co'
527
+ | 'cr'
528
+ | 'cu'
529
+ | 'cv'
530
+ | 'cw'
531
+ | 'cx'
532
+ | 'cy'
533
+ | 'cz'
534
+ | 'de'
535
+ | 'dj'
536
+ | 'dk'
537
+ | 'dm'
538
+ | 'do'
539
+ | 'dz'
540
+ | 'ec'
541
+ | 'ee'
542
+ | 'eg'
543
+ | 'eh'
544
+ | 'er'
545
+ | 'es'
546
+ | 'et'
547
+ | 'fi'
548
+ | 'fj'
549
+ | 'fk'
550
+ | 'fm'
551
+ | 'fo'
552
+ | 'fr'
553
+ | 'ga'
554
+ | 'gb'
555
+ | 'gd'
556
+ | 'ge'
557
+ | 'gf'
558
+ | 'gg'
559
+ | 'gh'
560
+ | 'gi'
561
+ | 'gl'
562
+ | 'gm'
563
+ | 'gn'
564
+ | 'gp'
565
+ | 'gq'
566
+ | 'gr'
567
+ | 'gs'
568
+ | 'gt'
569
+ | 'gu'
570
+ | 'gw'
571
+ | 'gy'
572
+ | 'hk'
573
+ | 'hm'
574
+ | 'hn'
575
+ | 'hr'
576
+ | 'ht'
577
+ | 'hu'
578
+ | 'id'
579
+ | 'ie'
580
+ | 'il'
581
+ | 'im'
582
+ | 'in'
583
+ | 'io'
584
+ | 'iq'
585
+ | 'ir'
586
+ | 'is'
587
+ | 'it'
588
+ | 'je'
589
+ | 'jm'
590
+ | 'jo'
591
+ | 'jp'
592
+ | 'ke'
593
+ | 'kg'
594
+ | 'kh'
595
+ | 'ki'
596
+ | 'km'
597
+ | 'kn'
598
+ | 'kp'
599
+ | 'kr'
600
+ | 'kw'
601
+ | 'ky'
602
+ | 'kz'
603
+ | 'la'
604
+ | 'lb'
605
+ | 'lc'
606
+ | 'li'
607
+ | 'lk'
608
+ | 'lr'
609
+ | 'ls'
610
+ | 'lt'
611
+ | 'lu'
612
+ | 'lv'
613
+ | 'ly'
614
+ | 'ma'
615
+ | 'mc'
616
+ | 'md'
617
+ | 'me'
618
+ | 'mf'
619
+ | 'mg'
620
+ | 'mh'
621
+ | 'mk'
622
+ | 'ml'
623
+ | 'mm'
624
+ | 'mn'
625
+ | 'mo'
626
+ | 'mp'
627
+ | 'mq'
628
+ | 'mr'
629
+ | 'ms'
630
+ | 'mt'
631
+ | 'mu'
632
+ | 'mv'
633
+ | 'mw'
634
+ | 'mx'
635
+ | 'my'
636
+ | 'mz'
637
+ | 'na'
638
+ | 'nc'
639
+ | 'ne'
640
+ | 'nf'
641
+ | 'ng'
642
+ | 'ni'
643
+ | 'nl'
644
+ | 'no'
645
+ | 'np'
646
+ | 'nr'
647
+ | 'nu'
648
+ | 'nz'
649
+ | 'om'
650
+ | 'pa'
651
+ | 'pe'
652
+ | 'pf'
653
+ | 'pg'
654
+ | 'ph'
655
+ | 'pk'
656
+ | 'pl'
657
+ | 'pm'
658
+ | 'pn'
659
+ | 'pr'
660
+ | 'ps'
661
+ | 'pt'
662
+ | 'pw'
663
+ | 'py'
664
+ | 'qa'
665
+ | 're'
666
+ | 'ro'
667
+ | 'rs'
668
+ | 'ru'
669
+ | 'rw'
670
+ | 'sa'
671
+ | 'sb'
672
+ | 'sc'
673
+ | 'sd'
674
+ | 'se'
675
+ | 'sg'
676
+ | 'sh'
677
+ | 'si'
678
+ | 'sj'
679
+ | 'sk'
680
+ | 'sl'
681
+ | 'sm'
682
+ | 'sn'
683
+ | 'so'
684
+ | 'sr'
685
+ | 'ss'
686
+ | 'st'
687
+ | 'sv'
688
+ | 'sx'
689
+ | 'sy'
690
+ | 'sz'
691
+ | 'tc'
692
+ | 'td'
693
+ | 'tf'
694
+ | 'tg'
695
+ | 'th'
696
+ | 'tj'
697
+ | 'tk'
698
+ | 'tl'
699
+ | 'tm'
700
+ | 'tn'
701
+ | 'to'
702
+ | 'tr'
703
+ | 'tt'
704
+ | 'tv'
705
+ | 'tw'
706
+ | 'tz'
707
+ | 'ua'
708
+ | 'ug'
709
+ | 'um'
710
+ | 'us'
711
+ | 'uy'
712
+ | 'uz'
713
+ | 'va'
714
+ | 'vc'
715
+ | 've'
716
+ | 'vg'
717
+ | 'vi'
718
+ | 'vn'
719
+ | 'vu'
720
+ | 'wf'
721
+ | 'ws'
722
+ | 'ye'
723
+ | 'yt'
724
+ | 'za'
725
+ | 'zm'
726
+ | 'zw';
@@ -1,96 +0,0 @@
1
- import { Timestamp, ISODateString, LoadedTranslations } from '@windy/types.d';
2
-
3
- /**
4
- * Main minifest object. Mother of all forecasts
5
- */
6
- export interface MinifestObject {
7
- /**
8
- * Version
9
- */
10
- v: string;
11
-
12
- /**
13
- * Array of hour moments that contain forecast data
14
- */
15
- dst: number[][];
16
-
17
- /**
18
- * Main identifier, identifiing the refTime on the backend.
19
- */
20
- info: string;
21
-
22
- /**
23
- * Reference time of forecast
24
- */
25
- ref: ISODateString;
26
-
27
- /**
28
- * Update time of the forecast
29
- */
30
- update: ISODateString;
31
-
32
- /**
33
- * In an emergency case backend can set `force` property at minifest. It breaks minifest client cache and set minifest at any circumstances
34
- */
35
- forced?: boolean;
36
- }
37
-
38
- /**
39
- * Main Calendar Day Object
40
- */
41
- export interface CalendarDay {
42
- /**
43
- * Translation ID for week day abbreviation
44
- */
45
- display: keyof LoadedTranslations;
46
-
47
- /**
48
- * Translation ID for week day abbreviation
49
- */
50
- displayLong: keyof LoadedTranslations;
51
-
52
- /**
53
- * Start of the day
54
- */
55
- start: Timestamp;
56
-
57
- /**
58
- * End of the day
59
- */
60
- end: Timestamp;
61
-
62
- /**
63
- * Midday of the day
64
- */
65
- middayTs: Timestamp;
66
-
67
- /**
68
- * Day of the month
69
- */
70
- day: number;
71
-
72
- /**
73
- * month
74
- */
75
- month: number;
76
-
77
- /**
78
- * year
79
- */
80
- year: number;
81
-
82
- /**
83
- * Forecast for this day is for Premium users only
84
- */
85
- premium: boolean;
86
-
87
- /**
88
- * Forecast for this day is available
89
- */
90
- hasForecast: boolean;
91
- }
92
-
93
- /**
94
- * Valid translation keys
95
- */
96
- export type Weekday = 'SUN' | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT';
@@ -1,94 +0,0 @@
1
- import { NumValue } from '@windy/types.d';
2
-
3
- export type RGBA = [number, number, number, number];
4
-
5
- export type YUVA = [number, number, number, number];
6
-
7
- export type ColorGradient = [NumValue, RGBA][];
8
-
9
- /**
10
- * 'rgb(200,0,150)'
11
- */
12
- export type RGBString = string;
13
-
14
- /**
15
- * 'rgba(200,0,150,1)'
16
- */
17
- export type RGBAString = string;
18
-
19
- export type ColorIdent =
20
- | 'temp'
21
- | 'wind'
22
- | 'rh'
23
- | 'pressure'
24
- | 'cclAltitude'
25
- | 'altitude'
26
- | 'deg0'
27
- | 'levels'
28
- | 'rain'
29
- | 'ptype'
30
- | 'rainClouds'
31
- | 'clouds'
32
- | 'lclouds'
33
- | 'hclouds'
34
- | 'mclouds'
35
- | 'cape'
36
- | 'lightDensity'
37
- | 'cbase'
38
- | 'snow'
39
- | 'rainAccu'
40
- | 'waves'
41
- | 'currents'
42
- | 'visibility'
43
- | 'gtco3'
44
- | 'aod550'
45
- | 'pm2p5'
46
- | 'no2'
47
- | 'tcso2'
48
- | 'go3'
49
- | 'cosc'
50
- | 'dust'
51
- | 'satellite'
52
- | 'radar'
53
- | 'radarPlus'
54
- | 'fog'
55
- | 'justGray'
56
- | 'efiWind'
57
- | 'efiTemp'
58
- | 'efiRain'
59
- | 'moistureAnom40'
60
- | 'moistureAnom100'
61
- | 'drought'
62
- | 'soilMoisture'
63
- | 'fwi'
64
- | 'dfm10h'
65
- | 'solarpower'
66
- | 'uvindex'
67
- | 'turbulence'
68
- | 'icing'
69
- | 'dewpoint'
70
- | 'wetbulbtemp';
71
-
72
- type PluginColorIdent =
73
- | 'airQ'
74
- | 'windDetail'
75
- | 'wavesDetail'
76
- | 'periodDetail'
77
- | 'altitudeDetail'
78
- | 'visibilityDetail'
79
- | 'dewpointSpreadDetail'
80
- | 'blitz'
81
- | 'radiation';
82
-
83
- // pressureIsolines color is dynamically created in @plugins/isolines
84
- export type AnyColorIdent =
85
- | ColorIdent
86
- | PluginColorIdent
87
- | 'pressureIsolines'
88
- | 'temporary'
89
- | 'direction';
90
-
91
- export interface UserColor {
92
- id: AnyColorIdent;
93
- gradient: ColorGradient;
94
- }