@windycom/plugin-devtools 3.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 (69) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/types/client/BottomSlide.d.ts +3 -0
  4. package/types/client/Color.d.ts +1 -1
  5. package/types/client/EcmwfProduct.d.ts +0 -22
  6. package/types/client/ExternalSveltePlugin.d.ts +6 -1
  7. package/types/client/IDB.d.ts +7 -1
  8. package/types/client/Metric.d.ts +5 -1
  9. package/types/client/Overlay.d.ts +1 -1
  10. package/types/client/Plugin.d.ts +4 -0
  11. package/types/client/Product.d.ts +2 -10
  12. package/types/client/RadarPlusProduct.d.ts +1 -1
  13. package/types/client/SatelliteProduct.d.ts +1 -1
  14. package/types/client/SveltePlugin.d.ts +7 -0
  15. package/types/client/WindowPlugin.d.ts +3 -2
  16. package/types/client/appsFlyer.d.ts +1 -2
  17. package/types/client/compatibilityCheck.d.ts +1 -0
  18. package/types/client/connection.d.ts +1 -1
  19. package/types/client/d.ts.files/Color.d.ts +1 -0
  20. package/types/client/d.ts.files/LabelsLayer.d.ts +2 -2
  21. package/types/client/d.ts.files/alerts.d.ts +1 -2
  22. package/types/client/d.ts.files/broadcast.d.ts +16 -11
  23. package/types/client/d.ts.files/dataSpecifications.d.ts +46 -21
  24. package/types/client/d.ts.files/favs.d.ts +19 -20
  25. package/types/client/d.ts.files/lib.d.ts +5 -7
  26. package/types/client/d.ts.files/plugin-params.d.ts +19 -11
  27. package/types/client/d.ts.files/plugins.d.ts +2 -1
  28. package/types/client/d.ts.files/products.d.ts +1 -2
  29. package/types/client/d.ts.files/rootScope.d.ts +12 -12
  30. package/types/client/d.ts.files/startup.d.ts +17 -11
  31. package/types/client/d.ts.files/user.d.ts +3 -0
  32. package/types/client/detectDevice.d.ts +0 -3
  33. package/types/client/device.d.ts +1 -0
  34. package/types/client/embed.d.ts +70 -0
  35. package/types/client/errorLogger.d.ts +28 -3
  36. package/types/client/errors.d.ts +6 -0
  37. package/types/client/fetch.d.ts +15 -3
  38. package/types/client/format.d.ts +1 -1
  39. package/types/client/http.d.ts +0 -6
  40. package/types/client/idbInstances.d.ts +21 -30
  41. package/types/client/imaker.d.ts +112 -0
  42. package/types/client/imakerMain.d.ts +49 -0
  43. package/types/client/latestBroadcasts.d.ts +1 -1
  44. package/types/client/lib.d.ts +1 -3
  45. package/types/client/libHtml.d.ts +1 -1
  46. package/types/client/liveAlerts.d.ts +5 -0
  47. package/types/client/liveAlerts.types.d.ts +28 -0
  48. package/types/client/location.d.ts +5 -0
  49. package/types/client/log.d.ts +3 -1
  50. package/types/client/mobile.d.ts +3 -2
  51. package/types/client/models.d.ts +7 -5
  52. package/types/client/notifications.d.ts +2 -5
  53. package/types/client/plugins.d.ts +4 -0
  54. package/types/client/promo.d.ts +1 -1
  55. package/types/client/pushNotifications.d.ts +1 -13
  56. package/types/client/rootScope.d.ts +9 -1
  57. package/types/client/router.d.ts +9 -33
  58. package/types/client/seoParser.d.ts +0 -35
  59. package/types/client/showableErrorsService.d.ts +6 -10
  60. package/types/client/storeLastPosition.d.ts +4 -1
  61. package/types/client/user.d.ts +2 -0
  62. package/types/client/userFavs.d.ts +10 -11
  63. package/types/client/utils.d.ts +40 -4
  64. package/types/iconfont.d.ts +7 -0
  65. package/types/interfaces.d.ts +150 -73
  66. package/types/lang-files.d.ts +625 -1
  67. package/types/types.d.ts +56 -17
  68. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  69. /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
package/README.md CHANGED
@@ -4,6 +4,7 @@ Check out https://docs.windy-plugins.com for more information.
4
4
 
5
5
  # CHANGELOG
6
6
 
7
+ - 3.0.1 - TS declarations for client v46.1.0
7
8
  - 3.0.0 - TS declarations for client v45.0.0
8
9
  - 2.0.2 - Support Windows in file path regex
9
10
  - 2.0.1 - Remove less-autoprefixer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windycom/plugin-devtools",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Developer tools and TS declarations for developers of Windy Plugins.",
5
5
  "main": "index.mjs",
6
6
  "module": "index.mjs",
@@ -48,6 +48,9 @@ export declare class BottomSlide extends Drag {
48
48
  ondrag(_x: number, y: number, e: Event): void;
49
49
  ondragend(): void;
50
50
  startDrag(e: TouchEvent): void;
51
+ release(): void;
51
52
  private initCloseOnSwipeDown;
53
+ private setHalfOpen;
52
54
  private updatePosition;
55
+ private onRqstPluginHalfOpen;
53
56
  }
@@ -75,7 +75,7 @@ export declare class Color {
75
75
  * bOpaque .. set alpha to 255
76
76
  * bPremultiply .. mul RGB by A
77
77
  * valueScale .. optional scale used for WebGL texture data (coef 0.5 means half step - gradient size is doubled)
78
- * return .. output Uint8Array with color data
78
+ * return .. output Uint8Array with color data (NOTE: Uint8ClampedArray NOT SUPPORTED in WebGL!)
79
79
  */
80
80
  createGradientArray(bOpaque?: boolean, bPremultiply?: boolean, valueScale?: number): Uint8Array;
81
81
  /**
@@ -1,29 +1,7 @@
1
1
  import { Calendar } from '@windy/Calendar';
2
2
  import { Product } from '@windy/Product';
3
3
  import type { ProductInitParams } from '@windy/Product';
4
- /**
5
- * Common product params for ECMWF products.
6
- */
7
- export declare const EcmwfProductParams: {
8
- modelName: string;
9
- modelResolution: number;
10
- provider: string;
11
- interval: number;
12
- intervalPremium: number;
13
- maxTileZoom: {
14
- free: number;
15
- premium: number;
16
- };
17
- dataQuality: "normal";
18
- };
19
4
  export declare class EcmwfProduct extends Product {
20
5
  calendar: Calendar;
21
6
  constructor(params: Partial<ProductInitParams>);
22
- /**
23
- * Create fake minifest file for ECMWF product to use it during rendering of
24
- * UI before real minifest is loaded.
25
- *
26
- * DO NOT TRY TO USE THIS CALENDAR FOR FETCHING DATA FROM SERVER!!!!
27
- */
28
- static createVirtualCalendar(this: EcmwfProduct): Calendar;
29
7
  }
@@ -22,10 +22,15 @@ export declare class ExternalSveltePlugin extends SveltePlugin<'windy-external-p
22
22
  mobileConfig: Record<InstalledExternalPluginConfig['mobileUI'], Config2config>;
23
23
  desktopConfig: Record<InstalledExternalPluginConfig['desktopUI'], Config2config>;
24
24
  widthOfRhPane: number;
25
+ version: string;
25
26
  listenToSingleclick: ExternalPluginConfig['listenToSingleclick'];
26
27
  addToContextmenu: ExternalPluginConfig['addToContextmenu'];
27
- constructor(params: WindowPluginInitParams<'windy-external-plugin'>, { desktopUI, title, mobileUI, desktopWidth, routerPath, listenToSingleclick, addToContextmenu, url, }: InstalledExternalPluginConfig);
28
+ constructor(params: WindowPluginInitParams<'windy-external-plugin'>, { desktopUI, title, mobileUI, desktopWidth, routerPath, listenToSingleclick, addToContextmenu, url, version, }: InstalledExternalPluginConfig);
28
29
  open({ params, disableOpeningAnimation, qs, }: PluginOpeningOptions<'windy-external-plugin'>): Promise<void | boolean>;
30
+ hasNewerVersion(latestVersion: string): boolean;
31
+ showConfirmationWindow(): Promise<boolean>;
32
+ getDayDiff(timestamp: string): number;
33
+ uninstallPlugin(): Promise<void>;
29
34
  getCss(): string;
30
35
  }
31
36
  export {};
@@ -1,8 +1,14 @@
1
1
  import type { Timestamp } from '@windy/types.d';
2
+ /**
3
+ * List of all collections we will need in our database
4
+ * remember to update this list when adding new collections
5
+ * Collections MUST be created at once
6
+ */
7
+ export declare const allUsedCollections: readonly ["customColors", "installedPlugins", "likedStoryComments", "log", "markedNotams", "popularLocations", "searchRecents", "seenArticles", "seenPromos", "seenStories", "slidedCapAlerts", "userAlerts", "userFavs"];
2
8
  /**
3
9
  * Allowed data types for storage
4
10
  */
5
- export type DatabaseStore = 'userFavs' | 'userAlerts' | 'customColors' | 'searchRecents' | 'markedNotams' | 'minifests' | 'seenArticles' | 'seenPromos';
11
+ export type DatabaseStore = (typeof allUsedCollections)[number];
6
12
  export type BackendItem<V> = {
7
13
  updated: Timestamp;
8
14
  id: string;
@@ -86,13 +86,17 @@ export declare abstract class Metric<T extends string | number = string | number
86
86
  * @param params
87
87
  */
88
88
  constructor(params: MetricInitParams);
89
+ /**
90
+ * Returns metric value
91
+ */
92
+ getMetric(): MetricItem;
89
93
  onMetricChanged(metric: MetricItem): void;
90
94
  getDefault(): MetricItem;
91
95
  setDefault(): void;
92
96
  /**
93
97
  * get value + label on a basis of user selected metric
94
98
  */
95
- convertValue(value: NumValue, separator?: string, suffix?: string): string;
99
+ convertValue(value: NumValue, separator?: string, suffix?: string, forcedPrecision?: number): string;
96
100
  /**
97
101
  * Not available
98
102
  */
@@ -159,7 +159,7 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
159
159
  /**
160
160
  * Just proxy to the Metric's metric property
161
161
  */
162
- get metric(): "" | import("./Metric").MetricItem;
162
+ get metric(): import("./Metric").MetricItem | "";
163
163
  protected initProperties(): void;
164
164
  }
165
165
  export {};
@@ -109,6 +109,10 @@ export declare class Plugin<P extends PluginIdent> {
109
109
  * Ready to be overloaded
110
110
  */
111
111
  paramsChanged(..._args: unknown[]): void;
112
+ /**
113
+ * Ready to be overloaded
114
+ */
115
+ onRenderStart(..._args: unknown[]): void;
112
116
  protected initProperties(): void;
113
117
  }
114
118
  export {};
@@ -192,12 +192,12 @@ export declare class Product {
192
192
  */
193
193
  hideProductSwitch?: boolean;
194
194
  constructor(params: ProductInitParams);
195
- refTime(): YYYYMMDDHH | '';
195
+ refTime(): YYYYMMDDHH | undefined;
196
196
  getUpdateTimes(): {
197
197
  refTime: ISODateString;
198
198
  minUpdate: Timestamp;
199
199
  } | null;
200
- moveTs(moveRight: boolean, isAccu?: boolean): boolean | void;
200
+ moveTs(moveRight: boolean, isAccu?: boolean): boolean;
201
201
  getMinifestUrl(): string;
202
202
  loadMinifest(): Promise<http.HttpPayload<MinifestObject>>;
203
203
  loadAndGetReftime(): Promise<ISODateString | undefined>;
@@ -211,14 +211,6 @@ export declare class Product {
211
211
  printLogo(): void;
212
212
  getCalendar(): Promise<Calendar>;
213
213
  protected expire(): void;
214
- /**
215
- * Since dissemination of minifests is not instant, and can last for minutes,
216
- * we have to double check, that incoming minifest
217
- * is newer than the one we have in store. If not, we keep the old one.
218
- *
219
- * @returns Incoming, or stored minifest, which is newer
220
- */
221
- protected getUpdatedMinifest(minifest: MinifestObject): Promise<MinifestObject>;
222
214
  protected setExpireTime(): void;
223
215
  /**
224
216
  * Major reason for this error is user's bad connection, which is handled
@@ -15,5 +15,5 @@ export declare class RadarPlusProduct extends StaticProduct {
15
15
  /**
16
16
  * Handling keyboard shortcuts
17
17
  */
18
- moveTs(moveRight: boolean): boolean | void;
18
+ moveTs(moveRight: boolean): boolean;
19
19
  }
@@ -15,5 +15,5 @@ export declare class SatelliteProduct extends StaticProduct {
15
15
  /**
16
16
  * Handling keyboard shortcuts
17
17
  */
18
- moveTs(moveRight: boolean): void;
18
+ moveTs(moveRight: boolean): boolean;
19
19
  }
@@ -2,13 +2,18 @@ import { WindowPlugin } from '@windy/WindowPlugin';
2
2
  import type { WindowPluginInitParams } from '@windy/WindowPlugin';
3
3
  import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
4
4
  import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
5
+ import type { InterpolatorFactory } from '@windy/interpolator';
6
+ import type { FullRenderParameters } from '@windy/Layer.d';
5
7
  export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> {
8
+ interpolator?: InterpolatorFactory;
6
9
  constructor(_args: {
7
10
  target: HTMLElement;
8
11
  anchor: HTMLElement;
9
12
  });
10
13
  onopen(params?: PluginsOpenParams[P], qs?: PluginsQsParams[P]): void;
11
14
  onclose(): void;
15
+ paramsChanged(params?: FullRenderParameters): void;
16
+ onRenderStart(params?: FullRenderParameters): void;
12
17
  $destroy(): void;
13
18
  }
14
19
  /**
@@ -39,6 +44,8 @@ export declare class SveltePlugin<P extends keyof SveltePlugins | keyof SveltePa
39
44
  });
40
45
  onopen(params?: PluginsOpenParams[P], _qs?: PluginsQsParams[P]): void;
41
46
  ondestroy(): void;
47
+ paramsChanged(params?: FullRenderParameters): void;
48
+ onRenderStart: (params?: FullRenderParameters) => void;
42
49
  protected mount(): void;
43
50
  protected unmount(): void;
44
51
  }
@@ -1,3 +1,4 @@
1
+ import { BottomSlide } from '@windy/BottomSlide';
1
2
  import { Plugin } from '@windy/Plugin';
2
3
  import { Window } from '@windy/Window';
3
4
  import type { PluginInitParams } from '@windy/Plugin';
@@ -6,9 +7,8 @@ import type { PluginOpeningOptions, WindowClosingOptions } from '@windy/interfac
6
7
  import type { InterpolatorFactory } from '@windy/interpolator';
7
8
  import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
8
9
  import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins, TagPlugins } from '@windy/plugins.d';
9
- import type { ParsedQueryString } from '@windy/queryString';
10
10
  import type { ListeningPriority } from '@windy/singleclick.d';
11
- import type { LoadedTranslations } from '@windy/types';
11
+ import type { LoadedTranslations, ParsedQueryString } from '@windy/types';
12
12
  export interface WindowPlugins extends TagPlugins, SveltePlugins, SveltePanePlugins, BottomSveltePlugins {
13
13
  }
14
14
  /** Allowed params to WindowPlugin constructor (private and protected props are omited by default) */
@@ -26,6 +26,7 @@ export declare abstract class WindowPlugin<P extends keyof WindowPlugins> extend
26
26
  * ID of CSS style
27
27
  */
28
28
  protected cssID: `plugin-css-${string}`;
29
+ protected bottomSlide?: BottomSlide;
29
30
  /**
30
31
  * Was CSS inserted into the DOM
31
32
  */
@@ -1,3 +1,2 @@
1
- import type { AppsFlyerPlugin } from 'appsflyer-capacitor-plugin/src/definitions';
2
- export declare const appsFlyerPromise: Promise<AppsFlyerPlugin | undefined>;
1
+ export declare const appsFlyerPromise: Promise<undefined>;
3
2
  export declare function logAppsFlyerProductChange(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Connection is lost, user is offline
3
3
  */
4
- export declare function testNetworkConnection(): void;
4
+ export declare function testNetworkConnection(): Promise<void>;
@@ -66,6 +66,7 @@ export type ColorIdent =
66
66
  | 'uvindex'
67
67
  | 'turbulence'
68
68
  | 'icing'
69
+ | 'dewpoint'
69
70
  | 'wetbulbtemp';
70
71
 
71
72
  type PluginColorIdent =
@@ -1,4 +1,4 @@
1
- import { Timestamp } from '@windy/types.d';
1
+ import { Timestamp, type NumOrNull } from '@windy/types.d';
2
2
 
3
3
  type CityDivId = string; // `${x}:${y}`
4
4
  type CityLabelId = string; // `${lat}/${lon}`
@@ -18,7 +18,7 @@ export interface CityLabel {
18
18
  el: HTMLDivElement;
19
19
 
20
20
  /** Forecast data with temperature in K, it is lazy loaded with forecast request */
21
- data?: number[];
21
+ data?: NumOrNull[];
22
22
  }
23
23
 
24
24
  /** Representation of one leaflet tile with its CityLabels */
@@ -20,10 +20,9 @@ export interface AlertRequest {
20
20
  priority?: number;
21
21
  suspended: boolean;
22
22
  userInterest: UserInterest;
23
+ hasCustomDescription?: boolean;
23
24
  }
24
25
 
25
- type Extends<T, U extends T> = U;
26
-
27
26
  export type GlobalProductWithWaves = Extends<Products, 'ecmwf' | 'gfs' | 'icon' | 'mblue'>;
28
27
 
29
28
  export interface AlertCheckResponse {
@@ -8,7 +8,6 @@
8
8
  TODO: Minimize amount of these events and reduce their usage
9
9
 
10
10
  */
11
- import { DetailLocChangeParams } from '@plugins/detail/detail.d';
12
11
  import { ParsLocation as GlobeParsLocation } from '@plugins/globe/main/receiver.d';
13
12
  import { Params as GlobeParams, Poi as GlobePoi } from '@plugins/globe/types.d';
14
13
  import { ExtendedDataAndParams } from '@plugins/isolines/IsolinesCanvas2D.d';
@@ -25,6 +24,7 @@ import type { CenterOptions } from '@windy/map';
25
24
  import type { AnimationOptions, FitBoundsOptions, LngLatBoundsLike } from '@windycom/maplibre-gl';
26
25
  import type { ViewportBounds } from '@plugins/_shared/maplibre/utils/maplibreUtils';
27
26
  import type { RadarPlusLayer } from '@plugins/radar-plus/types';
27
+ import type { ParsedStartupValues } from './router';
28
28
 
29
29
  type BcastTypesNonGeneric = {
30
30
  /**
@@ -80,9 +80,6 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
80
80
  /** Plugin was successfully closed */
81
81
  pluginOpened: [PluginIdent | string];
82
82
 
83
- /** Svelte plugin was successfully mounted */
84
- pluginMounted: [PluginIdent | string];
85
-
86
83
  /**
87
84
  * Triggered when Windy has successfully loaded and rendered requested data.
88
85
  * Use this for triggering your own tasks.
@@ -114,17 +111,26 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
114
111
  alertChanged: [];
115
112
 
116
113
  /**
117
- * Indicates, that router has parsed URL and launched plugin
118
- * that was requested in URL
114
+ * Indicates, that router has parsed URL
115
+ */
116
+ routerParsed: [PluginIdent | ExternalPluginIdent | void, ParsedStartupValues | undefined];
117
+
118
+ /**
119
+ * Indicates that mobile ui of plugin using BottomSlide was half opened
120
+ */
121
+ pluginHalfOpened: [PluginIdent, boolean];
122
+
123
+ /**
124
+ * Request to half open plugin, used in BottomSlide
119
125
  */
120
- routerParsed: [PluginIdent | ExternalPluginIdent | void];
126
+ rqstHalfOpen: [ident: PluginIdent, value: boolean | undefined, emit: boolean | undefined];
121
127
 
122
128
  // prettier-ignore
123
129
  /** @ignore */ globeOpened: [];
124
130
  /** @ignore */ globeClose: [];
125
131
  /** @ignore */ globeFailed: [];
126
132
 
127
- /** @ignore */ 'globe-detail': [DetailLocChangeParams | (LatLon & PluginSource)];
133
+ /** @ignore */ 'globe-detail': [LatLon & PluginSource];
128
134
  /** @ignore */ 'globe-isolines': [ExtendedDataAndParams | null];
129
135
  /** @ignore */ 'globe-poi': [GlobeParsLocation & { type?: string; id?: string }];
130
136
  /** @ignore */ 'globe-zoomIn': [[number, number] | null] | [];
@@ -155,13 +161,12 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
155
161
  ];
156
162
  /** @ignore */ 'radarPlus-open-layer': [RadarPlusLayer, boolean | undefined]; // Layer to open, whether to open layer for color editing
157
163
  /** @ignore */ detailClose: [];
158
- /** @ignore */ detailRendered: []; // used only in embed2
164
+ /** @ignore */ detailRendered: []; // used only in embed, imaker indicates that detail is ready
165
+ /** @ignore */ stationRendered: []; // used only in embed, imaker indicates that detail is ready
159
166
  /** @ignore */ reloadFavs: [];
160
167
  /** @ignore */ notifPrefChanged: [NotificationPreferences | undefined];
161
168
  /** @ignore */ satBackupReload: [];
162
169
  /** @ignore */ promptSavePassword: [];
163
- /** @ignore */ screenshotReady: [];
164
- /** @ignore */ screenshotError: [Error];
165
170
  /** @ignore */ onResume: [];
166
171
  /** @ignore */ back2home: [];
167
172
  /** @ignore */ reloadMobileApp: [];
@@ -12,9 +12,9 @@ import {
12
12
 
13
13
  import {
14
14
  Consent,
15
+ DetailExtendedLatLon,
15
16
  GeolocationInfo,
16
17
  HomeLocation,
17
- InstalledExternalPluginConfig,
18
18
  LatLon,
19
19
  } from '@windy/interfaces.d';
20
20
 
@@ -25,20 +25,21 @@ import {
25
25
  ShowableError,
26
26
  SubTier,
27
27
  Timestamp,
28
- type Hours,
29
- type RouteMotionSpeed,
30
- type UsedMapLibrary,
31
- type UserInterest,
28
+ Hours,
29
+ RouteMotionSpeed,
30
+ UsedMapLibrary,
31
+ UserInterest,
32
32
  } from '@windy/types.d';
33
33
 
34
34
  import { MetricItem } from '@windy/Metric.d';
35
35
 
36
- import type { User, LoginAndFinishAction } from '@windy/user.d';
36
+ import type { LoginAndFinishAction, User } from '@windy/user.d';
37
37
 
38
38
  import type { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
39
39
  import type RadarCalendar from '@plugins/radar/calendar/RadarCalendar';
40
40
  import type SatelliteCalendar from '@plugins/satellite/calendar/SatelliteCalendar';
41
- import type { NumberRange } from './alerts';
41
+ import type { NumberRange } from '@windy/alerts.d';
42
+ import type { FavTypeNew } from '@windy/favs.d';
42
43
 
43
44
  /**
44
45
  * Custom animation particles settings
@@ -151,6 +152,11 @@ export interface DataSpecificationsObject<T> {
151
152
  asyncSet?: (...args: unknown[]) => Promise<T>;
152
153
  }
153
154
 
155
+ export interface FeatureFlags {
156
+ disableSatellitePlus: boolean;
157
+ disableNewRadarPlusGui: boolean;
158
+ }
159
+
154
160
  /**
155
161
  * # Properties used in @windy/store
156
162
  *
@@ -209,7 +215,7 @@ export interface DataSpecifications {
209
215
  * Read only value! UTC string containing time of actually rendered data that are available for current overlay and weather model.
210
216
  * @ignore
211
217
  */
212
- path: DataSpecificationsObject<Path>;
218
+ path: DataSpecificationsObject<Path | null>;
213
219
 
214
220
  /**
215
221
  * Which type of isolines to render
@@ -281,6 +287,11 @@ export interface DataSpecifications {
281
287
  */
282
288
  latlon: DataSpecificationsObject<boolean>;
283
289
 
290
+ /**
291
+ * Display altitude on picker
292
+ */
293
+ showPickerElevation: DataSpecificationsObject<boolean>;
294
+
284
295
  /**
285
296
  * Desired language for Windy. By default is determined by user's browser setting and set to `auto`.
286
297
  * Use `store.getAllowed('lang')` to get list of avail langs defined in `supportedLanguages.
@@ -292,6 +303,11 @@ export interface DataSpecifications {
292
303
  */
293
304
  englishLabels: DataSpecificationsObject<boolean>;
294
305
 
306
+ /**
307
+ * Consent to receive newsletter
308
+ */
309
+ marketingConsent: DataSpecificationsObject<boolean>;
310
+
295
311
  /**
296
312
  * Display directions in Weather picker as number or as a string (for example NW).
297
313
  */
@@ -384,6 +400,11 @@ export interface DataSpecifications {
384
400
  */
385
401
  startUpLastOverlay: DataSpecificationsObject<boolean>;
386
402
 
403
+ /**
404
+ * User selected default zoom
405
+ */
406
+ startUpZoom: DataSpecificationsObject<number | null>;
407
+
387
408
  /**
388
409
  * Save forecast resolution step to be used at startup.
389
410
  * 1: 1h step
@@ -448,7 +469,7 @@ export interface DataSpecifications {
448
469
  * Detail's location - TODO: get rid of async name property
449
470
  * @ignore
450
471
  */
451
- detailLocation: DataSpecificationsObject<(LatLon & { name?: string; id?: string }) | null>;
472
+ detailLocation: DataSpecificationsObject<DetailExtendedLatLon | null>;
452
473
 
453
474
  /**
454
475
  * 1h step of forecast
@@ -697,12 +718,6 @@ export interface DataSpecifications {
697
718
  */
698
719
  mapCoords: DataSpecificationsObject<MapCoordinates | null>;
699
720
 
700
- /**
701
- * Whether app has been launched from some source which requires different init state
702
- * @ignore
703
- */
704
- launchedBy: DataSpecificationsObject<'radar-widget' | null>;
705
-
706
721
  /**
707
722
  * Any stored metric
708
723
  * @ignore
@@ -836,12 +851,6 @@ export interface DataSpecifications {
836
851
  */
837
852
  appLocalStorageCounter: DataSpecificationsObject<number | null>;
838
853
 
839
- /**
840
- * List of installed external plugins
841
- * @ignore
842
- */
843
- installedPlugins: DataSpecificationsObject<InstalledExternalPluginConfig[]>;
844
-
845
854
  /*
846
855
  * User has entered into arrange mode in RH menu
847
856
  */
@@ -879,6 +888,22 @@ export interface DataSpecifications {
879
888
  * successfully sent to the backend
880
889
  */
881
890
  pushNotificationsReady: DataSpecificationsObject<boolean>;
891
+
892
+ /**
893
+ * Feature flags to enable/disable features without the need to re-release the client
894
+ */
895
+ featureFlags: DataSpecificationsObject<FeatureFlags>;
896
+
897
+ /**
898
+ * Whenever fullscreen plugin is opened on mobile device suspend potential
899
+ * sound & haptic feedback on radar/sat layers
900
+ */
901
+ suspendSoundAndHaptic: DataSpecificationsObject<boolean>;
902
+
903
+ /**
904
+ * User has enabled advanced features in debug console
905
+ */
906
+ advancedDebugConsole: DataSpecificationsObject<boolean>;
882
907
  }
883
908
 
884
909
  /**
@@ -11,29 +11,28 @@ export type FavType = FavTypeNew | 'alert';
11
11
 
12
12
  export type RouteAsString = `${RouteType}/${string}`;
13
13
 
14
- export type FavFragment =
15
- | (LatLon & {
16
- /** Title of the fav */
17
- title: string;
18
- }) &
19
- (
20
- | { type: 'fav' }
14
+ export type FavFragment = (LatLon & {
15
+ /** Title of the fav */
16
+ title: string;
17
+ }) &
18
+ (
19
+ | { type: 'fav' }
21
20
 
22
- /** @deprecated use till migration of alerts is in process */
23
- | {
24
- type: 'alert';
25
- alert: Alert;
26
- alertProps: AlertProps;
27
- }
21
+ /** @deprecated use till migration of alerts is in process */
22
+ | {
23
+ type: 'alert';
24
+ alert: Alert;
25
+ alertProps: AlertProps;
26
+ }
28
27
 
29
- /** Airport ICAO code in case of airport */
30
- | { type: 'airport'; icao: string }
28
+ /** Airport ICAO code in case of airport */
29
+ | { type: 'airport'; icao: string }
31
30
 
32
- /** Weather station ID (if WX station) */
33
- | { type: 'station'; stationId: StationId }
34
- | { type: 'webcam'; webcamId: number }
35
- | { type: 'route'; route: RouteAsString }
36
- );
31
+ /** Weather station ID (if WX station) */
32
+ | { type: 'station'; stationId: StationId }
33
+ | { type: 'webcam'; webcamId: number }
34
+ | { type: 'route'; route: RouteAsString }
35
+ );
37
36
 
38
37
  export type Fav = FavFragment & {
39
38
  /** Unique mongoDb ID of item */
@@ -41,12 +41,11 @@ export interface InitOptions extends WindyAPIOptions {
41
41
  zoom?: number;
42
42
  }
43
43
 
44
- type ApiPicker =
45
- | typeof import('@windy/picker') & {
46
- open: (latLon: LatLon) => void;
47
- close: () => void;
48
- getParams: () => PluginsOpenParams['picker'];
49
- };
44
+ type ApiPicker = typeof import('@windy/picker') & {
45
+ open: (latLon: LatLon) => void;
46
+ close: () => void;
47
+ getParams: () => PluginsOpenParams['picker'];
48
+ };
50
49
 
51
50
  export type InitCb = (windyAPI: {
52
51
  map: WModules['map']['map'];
@@ -61,7 +60,6 @@ export type InitCb = (windyAPI: {
61
60
  export interface ApiAuthResponse {
62
61
  domains: string;
63
62
  paid: boolean;
64
- apiUser: string;
65
63
  id: string;
66
64
  name: string;
67
65
  type: string;