@windycom/plugin-devtools 1.0.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/index.mjs +2 -2
- package/package.json +2 -3
- package/types/client/AccessProducts.d.ts +8 -0
- package/types/client/BottomSveltePlugins.d.ts +8 -0
- package/types/client/Calendar.d.ts +9 -17
- package/types/client/Color.d.ts +43 -90
- package/types/client/Drag.d.ts +8 -1
- package/types/client/Evented.d.ts +4 -0
- package/types/client/ExternalSveltePlugin.d.ts +2 -1
- package/types/client/IDB.d.ts +63 -0
- package/types/client/IconProducts.d.ts +2 -0
- package/types/client/Layer.d.ts +1 -2
- package/types/client/Metric.d.ts +8 -8
- package/types/client/MetricClasses.d.ts +4 -3
- package/types/client/Overlay.d.ts +30 -15
- package/types/client/OverlayClasses.d.ts +11 -7
- package/types/client/Plugin.d.ts +2 -2
- package/types/client/Product.d.ts +53 -30
- package/types/client/RadarPlusProduct.d.ts +19 -0
- package/types/client/Renderer.d.ts +2 -10
- package/types/client/SveltePanePlugin.d.ts +4 -3
- package/types/client/SveltePlugin.d.ts +9 -5
- package/types/client/TileLayer.d.ts +1 -2
- package/types/client/TopoMap.d.ts +10 -0
- package/types/client/Window.d.ts +0 -4
- package/types/client/WindowPlugin.d.ts +15 -10
- package/types/client/appsFlyer.d.ts +3 -0
- package/types/client/baseMap.d.ts +8 -5
- package/types/client/cityLabels.d.ts +10 -2
- package/types/client/cloudSync.d.ts +3 -1
- package/types/client/colorGradients.d.ts +13 -0
- package/types/client/d.ts.files/Calendar.d.ts +11 -2
- package/types/client/d.ts.files/Color.d.ts +16 -5
- package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
- package/types/client/d.ts.files/Layer.d.ts +8 -1
- package/types/client/d.ts.files/Metric.d.ts +1 -0
- package/types/client/d.ts.files/Renderer.d.ts +22 -1
- package/types/client/d.ts.files/alerts.d.ts +120 -0
- package/types/client/d.ts.files/broadcast.d.ts +44 -17
- package/types/client/d.ts.files/dataSpecifications.d.ts +94 -137
- package/types/client/d.ts.files/favs.d.ts +69 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
- package/types/client/d.ts.files/notifications.d.ts +2 -2
- package/types/client/d.ts.files/plugin-params.d.ts +44 -58
- package/types/client/d.ts.files/plugins.d.ts +37 -52
- package/types/client/d.ts.files/pois.d.ts +1 -1
- package/types/client/d.ts.files/products.d.ts +19 -2
- package/types/client/d.ts.files/rootScope.d.ts +3 -21
- package/types/client/d.ts.files/satellite.d.ts +1 -0
- package/types/client/d.ts.files/startup.d.ts +59 -0
- package/types/client/d.ts.files/storage.d.ts +12 -35
- package/types/client/d.ts.files/user.d.ts +79 -24
- package/types/client/device.d.ts +0 -1
- package/types/client/deviceLogging.d.ts +2 -1
- package/types/client/embed2.d.ts +15 -35
- package/types/client/fetch.d.ts +31 -24
- package/types/client/ga.d.ts +4 -0
- package/types/client/geolocation.d.ts +14 -7
- package/types/client/globals.d.ts +1 -0
- package/types/client/http.d.ts +17 -0
- package/types/client/idbInstances.d.ts +45 -0
- package/types/client/interpolator.d.ts +2 -1
- package/types/client/langFiles.d.ts +2 -0
- package/types/client/layers.d.ts +2 -0
- package/types/client/lib.d.ts +7 -25
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
- package/types/client/log.d.ts +1 -0
- package/types/client/lruCache.d.ts +6 -0
- package/types/client/map.d.ts +17 -6
- package/types/client/mobile.d.ts +33 -27
- package/types/client/models.d.ts +1 -1
- package/types/client/nativeStorage.d.ts +0 -14
- package/types/client/notifications.d.ts +32 -67
- package/types/client/overlays.d.ts +4 -1
- package/types/client/params.d.ts +0 -1
- package/types/client/patchAndPromoCtrl.d.ts +13 -0
- package/types/client/permanentPromos.d.ts +1 -2
- package/types/client/persistentStorage.d.ts +8 -0
- package/types/client/picker.d.ts +1 -1
- package/types/client/pois.d.ts +1 -2
- package/types/client/promo.d.ts +16 -32
- package/types/client/pushNotifications.d.ts +13 -1
- package/types/client/queryString.d.ts +1 -1
- package/types/client/renderUtils.d.ts +1 -1
- package/types/client/renderers.d.ts +7 -3
- package/types/client/rootScope.d.ts +22 -27
- package/types/client/router.d.ts +10 -6
- package/types/client/seoParser.d.ts +21 -0
- package/types/client/serviceWorkerCtrl.d.ts +8 -0
- package/types/client/startupWeather.d.ts +27 -0
- package/types/client/store.d.ts +2 -2
- package/types/client/storeLastPosition.d.ts +1 -0
- package/types/client/subscription.d.ts +1 -0
- package/types/client/swDownloader.d.ts +7 -7
- package/types/client/swProxy.d.ts +1 -1
- package/types/client/swUtils.d.ts +3 -3
- package/types/client/trans.d.ts +26 -37
- package/types/client/user.d.ts +11 -14
- package/types/client/userAlerts.d.ts +68 -0
- package/types/client/userConsent.d.ts +6 -0
- package/types/client/userFavs.d.ts +46 -128
- package/types/client/utils.d.ts +46 -10
- package/types/iconfont.d.ts +6 -4
- package/types/interfaces.d.ts +199 -348
- package/types/lang-files.d.ts +736 -128
- package/types/offline.d.ts +100 -0
- package/types/types.d.ts +116 -29
- package/types/client/Bar.d.ts +0 -114
- package/types/client/BindedBar.d.ts +0 -51
- package/types/client/BindedCheckbox.d.ts +0 -30
- package/types/client/BindedDropDown.d.ts +0 -14
- package/types/client/BindedSwitch.d.ts +0 -35
- package/types/client/BottomTagPlugin.d.ts +0 -8
- package/types/client/Detail1hCheckbox.d.ts +0 -4
- package/types/client/DraggableDiv.d.ts +0 -21
- package/types/client/DropDown.d.ts +0 -37
- package/types/client/GhostBox.d.ts +0 -17
- package/types/client/Legend.d.ts +0 -6
- package/types/client/LongTap.d.ts +0 -21
- package/types/client/MobileCalendar.d.ts +0 -47
- package/types/client/OfflineMessagesClasses.d.ts +0 -30
- package/types/client/ProductSwitch.d.ts +0 -14
- package/types/client/Scrollable.d.ts +0 -14
- package/types/client/Switch.d.ts +0 -24
- package/types/client/TimestampBar.d.ts +0 -8
- package/types/client/Webcams.d.ts +0 -66
- package/types/client/d.ts.files/Product.d.ts +0 -37
- package/types/client/d.ts.files/trans.d.ts +0 -55
- package/types/client/favs.d.ts +0 -83
- package/types/client/hp.d.ts +0 -15
- package/types/client/offlineController.d.ts +0 -20
- /package/types/client/{loadersUI.d.ts → customColors.d.ts} +0 -0
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { MinifestObject } from '@windy/Calendar.d';
|
|
2
|
-
import { Fav, LastSentDevice, SavedFav, SeenArticle } from '@windy/interfaces.d';
|
|
3
|
-
import { StoredTransFile } from '@windy/trans.d';
|
|
4
1
|
import { Timestamp } from '@windy/types.d';
|
|
5
|
-
|
|
6
|
-
import
|
|
2
|
+
import { Fav, type ObsoleteFav } from '@windy/favs.d';
|
|
3
|
+
import { SearchRecent } from '@plugins/search/search';
|
|
7
4
|
|
|
8
5
|
export interface StorageData {
|
|
9
|
-
/**
|
|
10
|
-
* Number of hits for every single promo2 id.
|
|
11
|
-
*/
|
|
6
|
+
/** @deprecated replaced by IDB */
|
|
12
7
|
promos2?: Record<string, number>;
|
|
13
8
|
|
|
14
9
|
/**
|
|
@@ -35,18 +30,6 @@ export interface StorageData {
|
|
|
35
30
|
*/
|
|
36
31
|
rateDialogShown?: Timestamp;
|
|
37
32
|
|
|
38
|
-
lastSentDevice?: LastSentDevice;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Articles, user has seen on particular device
|
|
42
|
-
*/
|
|
43
|
-
articles?: Record<string, SeenArticle>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Airport detail offline cache
|
|
47
|
-
*/
|
|
48
|
-
'offline/airport'?: ReturnType<LRUCache<string>['toJSON']>;
|
|
49
|
-
|
|
50
33
|
/**
|
|
51
34
|
* Used by dev plugin for plugins development
|
|
52
35
|
*/
|
|
@@ -54,27 +37,21 @@ export interface StorageData {
|
|
|
54
37
|
|
|
55
38
|
version?: string;
|
|
56
39
|
|
|
57
|
-
// TODO - centralize all these template strings to the logic directly in their modules
|
|
58
|
-
|
|
59
40
|
[key: `settings_${string}_ts`]: Timestamp | null;
|
|
60
41
|
|
|
61
|
-
[key: `lang/${string}.json`]: StoredTransFile | null;
|
|
62
|
-
|
|
63
|
-
[key: `favs${number}`]: Record<string, SavedFav> | null;
|
|
64
|
-
|
|
65
|
-
// TODO - remove this
|
|
66
|
-
[key: `favs${number}_overflowed`]: Record<string, SavedFav> | null;
|
|
67
|
-
|
|
68
|
-
[key: `favs${number}_ts`]: Timestamp | null;
|
|
69
|
-
|
|
70
|
-
[key: `recents${number}`]: Record<string, Fav> | null;
|
|
71
|
-
|
|
72
|
-
[key: `lastMinifest/${string}`]: MinifestObject | null;
|
|
73
|
-
|
|
74
42
|
/**
|
|
75
43
|
* Other dynamically add storage data
|
|
76
44
|
*/
|
|
77
45
|
[ident: string]: unknown | null;
|
|
46
|
+
|
|
47
|
+
/** @deprecated & replaced by IDB */
|
|
48
|
+
[key: `recents${number}`]: Record<string, SearchRecent> | null;
|
|
49
|
+
|
|
50
|
+
/** @deprecated & replaced by IDB */
|
|
51
|
+
[key: `favs${number}`]: Record<string, Fav | ObsoleteFav> | null;
|
|
52
|
+
|
|
53
|
+
/** @deprecated & replaced by IDB */
|
|
54
|
+
[key: `favs${number}_ts`]: Timestamp | null;
|
|
78
55
|
}
|
|
79
56
|
|
|
80
57
|
export type StorageDataKey = keyof StorageData & string;
|
|
@@ -1,35 +1,56 @@
|
|
|
1
1
|
import { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { SubTier, type ExternalPluginIdent } from '@windy/types.d';
|
|
3
|
+
import { FavFragment } from '@windy/favs';
|
|
4
|
+
import type { PluginsOpenParams } from '@windy/plugin-params';
|
|
5
|
+
|
|
6
|
+
export interface User {
|
|
7
|
+
avatar?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
fullname?: string;
|
|
10
|
+
id: number;
|
|
11
|
+
username: string;
|
|
12
|
+
userslug: string;
|
|
13
|
+
verifiedEmail?: string;
|
|
14
|
+
|
|
15
|
+
/** Based on user location, cookie consent can be shown to the user if needed */
|
|
16
|
+
requiresCookieConsent: boolean;
|
|
17
|
+
|
|
18
|
+
/** TimeStamp of user registration */
|
|
19
|
+
joindate?: number;
|
|
20
|
+
|
|
21
|
+
/** TimeStamp of user last login */
|
|
22
|
+
logindate?: number;
|
|
23
|
+
}
|
|
4
24
|
|
|
5
25
|
/**
|
|
6
26
|
* user info as it's returned from account or node users
|
|
7
27
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
export type UserInfo = {
|
|
29
|
+
/** aka userToken in storage */
|
|
30
|
+
token: string;
|
|
31
|
+
} & (
|
|
32
|
+
| {
|
|
33
|
+
auth: false;
|
|
34
|
+
userInfo: {
|
|
35
|
+
requiresCookieConsent: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
| {
|
|
39
|
+
/** true if user is authenticated */
|
|
40
|
+
auth: true;
|
|
18
41
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* tier level of user premium - TODO remove
|
|
22
|
-
*/
|
|
23
|
-
subscription?: SubTier;
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
subscription?: SubTier;
|
|
24
44
|
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
/** Detail info about subscription. It is undefined if no subscription is available for the user. */
|
|
46
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
27
47
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
48
|
+
/**
|
|
49
|
+
* user as in storage definition
|
|
50
|
+
*/
|
|
51
|
+
userInfo: User;
|
|
52
|
+
}
|
|
53
|
+
);
|
|
33
54
|
|
|
34
55
|
/**
|
|
35
56
|
* @typedef {Object} LoginResponse login response as it's returned from account or node login
|
|
@@ -56,3 +77,37 @@ export interface AccountLoginResponse {
|
|
|
56
77
|
*/
|
|
57
78
|
authHash: string;
|
|
58
79
|
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* In order to motivate users to register/login, we show login/register popup
|
|
83
|
+
* in certain situations. This object contains
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
export type LoginAndFinishAction =
|
|
87
|
+
| {
|
|
88
|
+
action: 'addFav';
|
|
89
|
+
params: FavFragment;
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
action: 'alerts-edit';
|
|
93
|
+
params: PluginsOpenParams['alerts-edit'];
|
|
94
|
+
}
|
|
95
|
+
| {
|
|
96
|
+
action: 'uploader';
|
|
97
|
+
params: PluginsOpenParams['uploader'];
|
|
98
|
+
}
|
|
99
|
+
| {
|
|
100
|
+
action: 'favs';
|
|
101
|
+
params: PluginsOpenParams['favs'];
|
|
102
|
+
}
|
|
103
|
+
| {
|
|
104
|
+
action: 'colors';
|
|
105
|
+
params: PluginsOpenParams['colors'];
|
|
106
|
+
}
|
|
107
|
+
| {
|
|
108
|
+
action: 'openExternalPlugin';
|
|
109
|
+
params: {
|
|
110
|
+
name: ExternalPluginIdent;
|
|
111
|
+
openParams: PluginsOpenParams['windy-external-plugin'];
|
|
112
|
+
};
|
|
113
|
+
};
|
package/types/client/device.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RegistrationHash } from '@windy/pushNotifications';
|
|
1
2
|
/**
|
|
2
3
|
* Deactivates current device from push notif backend
|
|
3
4
|
*
|
|
@@ -10,4 +11,4 @@ export declare const deactivateCurrentDevice: () => Promise<void>;
|
|
|
10
11
|
* @param registrationHash Push notification registration hash
|
|
11
12
|
* @returns
|
|
12
13
|
*/
|
|
13
|
-
export declare const saveCurrentDevice: (registrationHash
|
|
14
|
+
export declare const saveCurrentDevice: (registrationHash?: RegistrationHash | null) => Promise<void>;
|
package/types/client/embed2.d.ts
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
/// <reference types="@windy/declarations/windy-modules" />
|
|
2
1
|
import './utils/errorLogger';
|
|
3
2
|
import './leafletExt/CanvasLayer';
|
|
4
3
|
import './services/params';
|
|
5
|
-
import './pluginSystem/BottomTagPlugin';
|
|
6
4
|
import './pluginSystem/Plugin';
|
|
7
5
|
import './pluginSystem/SveltePlugin';
|
|
8
6
|
import './pluginSystem/TagPlugin';
|
|
9
7
|
import './pluginSystem/WindowPlugin';
|
|
10
8
|
import './pluginSystem/pluginsCtrl';
|
|
11
9
|
import './ui/components';
|
|
12
|
-
import './ui/loadersUI';
|
|
13
10
|
import './ui/timeAnimation';
|
|
14
11
|
import './ui/visibility';
|
|
15
12
|
import './render/renderTile';
|
|
16
|
-
import './render/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
import 'virtual:langEn';
|
|
13
|
+
import './render/tileLayerInstance';
|
|
14
|
+
export * as detectDevice from './dummyModules/detectDevice';
|
|
15
|
+
export * as log from './dummyModules/log';
|
|
16
|
+
export * as promo from './dummyModules/promo';
|
|
17
|
+
export * as seoParser from './dummyModules/seoParser';
|
|
18
|
+
export * as location from './dummyModules/location';
|
|
19
|
+
export * as router from './dummyModules/router';
|
|
20
|
+
export * as showableErrorsService from './dummyModules/showableErrorsService';
|
|
21
|
+
export * as userFavs from './dummyModules/userFavs';
|
|
26
22
|
import bcast from './services/broadcast';
|
|
27
23
|
import * as rootScope from './services/rootScope';
|
|
28
24
|
import { default as store } from './services/store';
|
|
25
|
+
export * as user from './services/user';
|
|
29
26
|
import * as ga from './utils/ga';
|
|
30
27
|
import { $ } from './utils/utils';
|
|
31
28
|
import { default as overlays } from './weather/overlays';
|
|
32
29
|
export { rootScope };
|
|
33
|
-
export * as progressBar from '../plugins/progress-bar/progress-bar';
|
|
34
|
-
export * as location from './dummyModules/location';
|
|
35
|
-
export * as router from './dummyModules/router';
|
|
36
30
|
export * as map from './map/map';
|
|
31
|
+
export * as baseMap from './map/baseMap';
|
|
32
|
+
export * as cityLabels from './map/cityLabels';
|
|
33
|
+
export * as mapGlobeCtrl from './map/mapGlobeCtrl';
|
|
37
34
|
export * as picker from './map/picker';
|
|
38
35
|
export * as singleclick from './map/singleclick';
|
|
39
36
|
export { default as plugins } from './pluginSystem/plugins';
|
|
@@ -45,34 +42,17 @@ export { default as colors } from './services/colors';
|
|
|
45
42
|
export * as connection from './services/connection';
|
|
46
43
|
export * as device from './services/device';
|
|
47
44
|
export * as geolocation from './services/geolocation';
|
|
48
|
-
export
|
|
45
|
+
export * as notifications from './services/notifications';
|
|
49
46
|
export * as pois from './services/pois';
|
|
50
47
|
export * as reverseName from './services/reverseName';
|
|
51
|
-
export * as showableErrorsService from './services/showableErrorsService';
|
|
52
48
|
export * as trans from './services/trans';
|
|
53
|
-
export * as
|
|
54
|
-
export { default as promo } from './ui/promo';
|
|
49
|
+
export * as startupWeather from './ui/startupWeather';
|
|
55
50
|
export * as query from './ui/query';
|
|
56
51
|
export * as rhMessage from './ui/rhMessage';
|
|
57
|
-
export * as user from './ui/user';
|
|
58
|
-
export * as BindedBar from './uiClasses/BindedBar';
|
|
59
|
-
export * as BindedCheckbox from './uiClasses/BindedCheckbox';
|
|
60
|
-
export * as BindedSwitch from './uiClasses/BindedSwitch';
|
|
61
52
|
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
62
53
|
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
63
|
-
export * as Detail1hCheckbox from './uiClasses/Detail1hCheckbox';
|
|
64
54
|
export * as Drag from './uiClasses/Drag';
|
|
65
|
-
export * as DraggableDiv from './uiClasses/DraggableDiv';
|
|
66
|
-
export * as DropDown from './uiClasses/DropDown';
|
|
67
|
-
export * as GhostBox from './uiClasses/GhostBox';
|
|
68
|
-
export * as Legend from './uiClasses/Legend';
|
|
69
|
-
export * as LongTap from './uiClasses/LongTap';
|
|
70
|
-
export * as MobileCalendar from './uiClasses/MobileCalendar';
|
|
71
|
-
export * as ProductSwitch from './uiClasses/ProductSwitch';
|
|
72
|
-
export * as Scrollable from './uiClasses/Scrollable';
|
|
73
55
|
export * as Swipe from './uiClasses/Swipe';
|
|
74
|
-
export * as Switch from './uiClasses/Switch';
|
|
75
|
-
export * as TimestampBar from './uiClasses/TimestampBar';
|
|
76
56
|
export * as Window from './uiClasses/Window';
|
|
77
57
|
export * as Evented from './utils/Evented';
|
|
78
58
|
export * as errorLogger from './utils/errorLogger';
|
package/types/client/fetch.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DataHash, LatLon, MeteogramDataPayload, WeatherDataPayload } from '@windy/interfaces.d';
|
|
1
|
+
import type { CityTemperaturesDto } from '@windy-types/citytile2';
|
|
2
|
+
import type { DataHash, LatLon, MeteogramDataPayload, WeatherDataPayload, ActiveStormCountPayload } from '@windy/interfaces.d';
|
|
3
3
|
import type { Pois, Products } from '@windy/rootScope.d';
|
|
4
|
-
import type { ExtendedStationType } from '@windy/types';
|
|
5
|
-
import type { HttpOptions, HttpPayload } from './http.d';
|
|
4
|
+
import type { ExtendedStationType, StationOrPoiType } from '@windy/types';
|
|
5
|
+
import type { HttpOptions, HttpPayload, QueryStringSource } from './http.d';
|
|
6
6
|
interface LatLonStep extends LatLon {
|
|
7
7
|
step?: number;
|
|
8
8
|
interpolate?: boolean;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
export declare const getReftimeIso: (model: Products) => any;
|
|
14
10
|
/**
|
|
15
11
|
* Returns URL for webcam detail by id
|
|
16
12
|
*
|
|
@@ -54,49 +50,52 @@ export declare const getSearchWebcamViewsUrl: (textQuery: string, latLon?: LatLo
|
|
|
54
50
|
* @ignore
|
|
55
51
|
*/
|
|
56
52
|
export declare const getWebcamMetricsUrl: (id: string | number) => string;
|
|
53
|
+
/**
|
|
54
|
+
* Gets point forecast data URL for given location
|
|
55
|
+
*
|
|
56
|
+
* @param model Forecast model
|
|
57
|
+
* @param params LalLon of the location and additional parameters
|
|
58
|
+
* @param pointForecastOptions Additional options of point forecast API
|
|
59
|
+
* @param httpOptions Additional HTTP options
|
|
60
|
+
* @returns URL string for getting point forecast data
|
|
61
|
+
*/
|
|
62
|
+
export declare const getPointForecastUrl: <T extends LatLonStep>(model: Products, { lat, lon, step, interpolate }: T, pointForecastOptions?: Record<string, string>) => Promise<string>;
|
|
57
63
|
/**
|
|
58
64
|
* Gets point forecast data for given location
|
|
59
65
|
*
|
|
60
66
|
* @param model Forecast model
|
|
61
67
|
* @param params LalLon of the location and additional parameters
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
64
|
-
* @param options Additional HTTP options
|
|
68
|
+
* @param pointForecastOptions Additional options of point forecast API
|
|
69
|
+
* @param httpOptions Additional HTTP options
|
|
65
70
|
* @returns Promise with HTTP payload
|
|
66
71
|
*/
|
|
67
|
-
export declare const getPointForecastData: <T extends LatLonStep>(model: Products,
|
|
72
|
+
export declare const getPointForecastData: <T extends LatLonStep>(model: Products, latLonStepInterpolate: T, pointForecastOptions?: Record<string, string>, httpOptions?: HttpOptions) => Promise<HttpPayload<WeatherDataPayload<DataHash>>>;
|
|
68
73
|
/**
|
|
69
74
|
* Gets enhanced point forecast meteogram data for given location
|
|
70
|
-
* @param model Forecast model
|
|
71
|
-
* @param params LalLon of the location and additional parameters
|
|
72
|
-
* @param source Who is the initiator of this request (name of you plugin)
|
|
73
|
-
* @param qs Additional query string
|
|
74
|
-
* @param options Additional HTTP options
|
|
75
75
|
* @returns Promise with HTTP payload
|
|
76
76
|
*/
|
|
77
|
-
export declare const
|
|
77
|
+
export declare const getMeteogramForecastUrl: <T extends LatLonStep>(model: Products, { lat, lon, step }: T, pointForecastOptions?: Record<string, string>) => Promise<string>;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
79
|
+
* Gets enhanced point forecast meteogram data for given location
|
|
80
|
+
* @returns Promise with HTTP payload
|
|
81
81
|
*/
|
|
82
|
-
export declare const
|
|
82
|
+
export declare const getMeteogramForecastData: <T extends LatLonStep>(model: Products, latLonStep: T, pointForecastOptions?: Record<string, string>, httpOptions?: HttpOptions) => Promise<HttpPayload<MeteogramDataPayload>>;
|
|
83
83
|
/**
|
|
84
84
|
* Returns URL for getting citytile forecast
|
|
85
85
|
*
|
|
86
86
|
* @param model Forecast model
|
|
87
87
|
* @param frag Mercator frag in {z}/{x}/{y} format
|
|
88
|
-
* @param options HTTP options
|
|
89
88
|
* @returns URL for getting citytile forecast
|
|
90
89
|
* @ignore
|
|
91
90
|
*/
|
|
92
|
-
export declare const getCitytileData: (model: Products, frag: string
|
|
91
|
+
export declare const getCitytileData: (model: Products, frag: string) => Promise<HttpPayload<CityTemperaturesDto> | null>;
|
|
93
92
|
/**
|
|
94
93
|
* Returns URL for nearest POI items (stations, airQ, ...)
|
|
95
94
|
* @param param0
|
|
96
95
|
* @returns URL for getting nearest POI items
|
|
97
96
|
* @ignore
|
|
98
97
|
*/
|
|
99
|
-
export declare const getNearestPoiItemsUrl: (type: Pois | 'stations', { lat, lon }: LatLon) => string;
|
|
98
|
+
export declare const getNearestPoiItemsUrl: (type: Pois | 'stations', { lat, lon }: LatLon, options?: QueryStringSource) => string;
|
|
100
99
|
/**
|
|
101
100
|
* Returns URL for tide forecast
|
|
102
101
|
* @ignore
|
|
@@ -112,4 +111,12 @@ export declare const getTidePoiUrl: (id: string) => string;
|
|
|
112
111
|
* @ignore
|
|
113
112
|
*/
|
|
114
113
|
export declare const getObservationsUrl: (type: ExtendedStationType, id: string, daysFrom: number, daysTo?: number) => string;
|
|
114
|
+
/**
|
|
115
|
+
* Get URL for getting observations for a specific station in node-poi server
|
|
116
|
+
*/
|
|
117
|
+
export declare const getObservationPoiUrl: (type: StationOrPoiType | 'stations', id: string) => string;
|
|
118
|
+
/**
|
|
119
|
+
* Returns http promise for active hurricanes count
|
|
120
|
+
*/
|
|
121
|
+
export declare const getHurricanesCount: () => Promise<HttpPayload<ActiveStormCountPayload>>;
|
|
115
122
|
export {};
|
package/types/client/ga.d.ts
CHANGED
|
@@ -11,13 +11,21 @@ import type { PositionOptions } from '@capacitor/geolocation';
|
|
|
11
11
|
* @returns Location got from GPS or IP, the newer is preferred
|
|
12
12
|
*/
|
|
13
13
|
export declare const getMyLatestPos: () => GeolocationInfo;
|
|
14
|
+
interface GeolocationOptions extends PositionOptions {
|
|
15
|
+
doNotShowSearchGPSMessage?: boolean;
|
|
16
|
+
doNotShowFailureMessage?: boolean;
|
|
17
|
+
getMeFallbackGps?: boolean;
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
20
|
* Returns promise on GPS based location with GeoIP location as a fallback.
|
|
16
21
|
*
|
|
17
|
-
*
|
|
22
|
+
* Enables to display information messages to user by default, and enables to
|
|
23
|
+
* get fallback GPS location if GPS location is not available.
|
|
24
|
+
*
|
|
25
|
+
* @param options Options for geolocation
|
|
18
26
|
* @returns Geolocation info from GPS, GeoIP as a fallback
|
|
19
27
|
*/
|
|
20
|
-
export declare const getGPSlocation: (options?:
|
|
28
|
+
export declare const getGPSlocation: (options?: GeolocationOptions) => Promise<GeolocationInfo>;
|
|
21
29
|
/**
|
|
22
30
|
* Returns fallback name created from lat,lon if nothing else can be used
|
|
23
31
|
*
|
|
@@ -29,10 +37,9 @@ export declare const getGPSlocation: (options?: PositionOptions) => Promise<Geol
|
|
|
29
37
|
*/
|
|
30
38
|
export declare const getFallbackName: (lat: number | string, lon: number | string) => string;
|
|
31
39
|
/**
|
|
32
|
-
* Gets accurate home location. Cannot be used in map initialization
|
|
33
|
-
*
|
|
34
|
-
* @param cb Callback function to call when location is get. Location info object is passed as a callback argument
|
|
35
|
-
*
|
|
40
|
+
* Gets accurate home location. Cannot be used in map initialization because it is async.
|
|
36
41
|
* @ignore
|
|
37
42
|
*/
|
|
38
|
-
export declare const getHomeLocation: (
|
|
43
|
+
export declare const getHomeLocation: () => Promise<GeolocationInfo | HomeLocation>;
|
|
44
|
+
export declare function requestLocationPermissions(): Promise<boolean>;
|
|
45
|
+
export {};
|
package/types/client/http.d.ts
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
* HTTP fetch lib using Promises, authorization and lru caching
|
|
3
3
|
*/
|
|
4
4
|
import type { HttpOptions, HttpPayload } from './d.ts.files/http.d';
|
|
5
|
+
/**
|
|
6
|
+
* Type of the string, that will be added to the header in Accept line to increase stealing protection a little bit
|
|
7
|
+
*
|
|
8
|
+
* Target mobile: Use legacy header format until mobile apps start sending correct origin to pass CORS check on the server
|
|
9
|
+
*/
|
|
10
|
+
export declare const acceptHeader: string;
|
|
11
|
+
/**
|
|
12
|
+
* Enhances URL with server, tokens and auth counter
|
|
13
|
+
*/
|
|
5
14
|
export declare const getURL: (url: string) => string;
|
|
6
15
|
export declare class HttpError extends Error {
|
|
7
16
|
status: number;
|
|
@@ -51,6 +60,14 @@ export declare const post: StandardHttpRequestFun;
|
|
|
51
60
|
* @returns HTTP payload or null when anything failed
|
|
52
61
|
*/
|
|
53
62
|
export declare const put: StandardHttpRequestFun;
|
|
63
|
+
/**
|
|
64
|
+
* Make PATCH http request
|
|
65
|
+
*
|
|
66
|
+
* @param url Url
|
|
67
|
+
* @param options Options
|
|
68
|
+
* @returns HTTP payload or null when anything failed
|
|
69
|
+
*/
|
|
70
|
+
export declare const patch: StandardHttpRequestFun;
|
|
54
71
|
/**
|
|
55
72
|
* Make HEAD http request
|
|
56
73
|
*
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IDB } from '@windy/IDB';
|
|
2
|
+
import type { Fav } from '@windy/favs.d';
|
|
3
|
+
import type { SearchRecent } from '@plugins/search/search';
|
|
4
|
+
import type { AlertResponse, AlertRequest } from '@windy/alerts';
|
|
5
|
+
import type { MarkedNotams } from '@plugins/airport/airport';
|
|
6
|
+
import type { MinifestObject } from '@windy/Calendar.d';
|
|
7
|
+
import type { SeenArticle } from '@windy/startup.d';
|
|
8
|
+
import type { PromoInfoObject } from '@windy/promo';
|
|
9
|
+
import type { AnyColorIdent, UserColor } from '@windy/Color.d';
|
|
10
|
+
export declare const initPromise: Promise<IDBDatabase>;
|
|
11
|
+
/** Db of stored user favourites */
|
|
12
|
+
export declare const userFavsIdb: IDB<string, Fav, import("../../types/interfaces").LatLon & {
|
|
13
|
+
title: string;
|
|
14
|
+
} & ({
|
|
15
|
+
type: "fav";
|
|
16
|
+
} | {
|
|
17
|
+
type: "alert";
|
|
18
|
+
alert: import("../../types/interfaces").Alert;
|
|
19
|
+
alertProps: import("../../types/interfaces").AlertProps;
|
|
20
|
+
} | {
|
|
21
|
+
type: "airport";
|
|
22
|
+
icao: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "station";
|
|
25
|
+
stationId: `radiation-${string}` | `airq-${string}` | `ad-${string}` | `wmo-${string}` | `madis-${string}` | `buoy-${string}` | `dbuoy-${string}` | `pws-${string}` | `ship-${string}`;
|
|
26
|
+
} | {
|
|
27
|
+
type: "webcam";
|
|
28
|
+
webcamId: number;
|
|
29
|
+
} | {
|
|
30
|
+
type: "route";
|
|
31
|
+
route: `car/${string}` | `vfr/${string}` | `ifr/${string}` | `elevation/${string}` | `boat/${string}` | `airgram/${string}`;
|
|
32
|
+
})>;
|
|
33
|
+
export declare const searchRecentsIdb: IDB<string, SearchRecent, SearchRecent>;
|
|
34
|
+
/** Db of stored user alerts */
|
|
35
|
+
export declare const userAlertsIdb: IDB<string, AlertResponse, AlertRequest>;
|
|
36
|
+
/** Db of stored notams marked as read */
|
|
37
|
+
export declare const markedNotamsIdb: IDB<`${string}_${string}/${string}`, MarkedNotams, MarkedNotams>;
|
|
38
|
+
/** Latest used minifests */
|
|
39
|
+
export declare const minifestsIdb: IDB<string, MinifestObject, MinifestObject>;
|
|
40
|
+
/** Seen articles */
|
|
41
|
+
export declare const seenArticlesIdb: IDB<string, SeenArticle, SeenArticle>;
|
|
42
|
+
/** Seen promos */
|
|
43
|
+
export declare const seenPromosIdb: IDB<string, PromoInfoObject, PromoInfoObject>;
|
|
44
|
+
/** Custom user colors */
|
|
45
|
+
export declare const customColorsIdb: IDB<AnyColorIdent, UserColor, UserColor>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CoordsInterpolationFun, PixelInterpolationFun } from '@windy/interpolatorTypes';
|
|
1
|
+
import type { CoordsInterpolationFun, PixelInterpolationFun, RGBNumValues, InterpolatorPossibleReturns } from '@windy/interpolatorTypes';
|
|
2
|
+
export type { CoordsInterpolationFun, PixelInterpolationFun, RGBNumValues, InterpolatorPossibleReturns, };
|
|
2
3
|
export type InterpolatorFactory = {
|
|
3
4
|
createFun: (cb: <T>(...args: unknown[]) => T | void) => void;
|
|
4
5
|
};
|
package/types/client/layers.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ declare const layers: {
|
|
|
54
54
|
dustsm: Layer<NumberedMetric>;
|
|
55
55
|
radar: Layer<NumberedMetric>;
|
|
56
56
|
satellite: Layer<NumberedMetric>;
|
|
57
|
+
radarPlus: Layer<NumberedMetric>;
|
|
57
58
|
gtco3: Layer<NumberedMetric>;
|
|
58
59
|
pm2p5: Layer<NumberedMetric>;
|
|
59
60
|
no2: Layer<NumberedMetric>;
|
|
@@ -74,5 +75,6 @@ declare const layers: {
|
|
|
74
75
|
dfm10h: Layer<NumberedMetric>;
|
|
75
76
|
turbulence: Layer<NumberedMetric>;
|
|
76
77
|
icing: Layer<NumberedMetric>;
|
|
78
|
+
topoMap: Layer<undefined>;
|
|
77
79
|
};
|
|
78
80
|
export default layers;
|
package/types/client/lib.d.ts
CHANGED
|
@@ -39,14 +39,12 @@ export * as detectDevice from '../services/detectDevice';
|
|
|
39
39
|
export * as device from '../services/device';
|
|
40
40
|
export * as deviceLogging from '../services/deviceLogging';
|
|
41
41
|
export * as geolocation from '../services/geolocation';
|
|
42
|
-
export
|
|
42
|
+
export * as notifications from '../services/notifications';
|
|
43
43
|
export * as ogTags from '../services/ogTags';
|
|
44
44
|
export * as params from '../services/params';
|
|
45
45
|
export * as rootScope from '../services/rootScope';
|
|
46
|
-
export * as showableErrorsService from '../services/showableErrorsService';
|
|
47
46
|
export { default as store } from '../services/store';
|
|
48
47
|
export * as trans from '../services/trans';
|
|
49
|
-
export * as BottomTagPlugin from '../pluginSystem/BottomTagPlugin';
|
|
50
48
|
export * as Plugin from '../pluginSystem/Plugin';
|
|
51
49
|
export * as SveltePanePlugin from '../pluginSystem/SveltePanePlugin';
|
|
52
50
|
export * as SveltePlugin from '../pluginSystem/SveltePlugin';
|
|
@@ -54,27 +52,11 @@ export * as TagPlugin from '../pluginSystem/TagPlugin';
|
|
|
54
52
|
export * as WindowPlugin from '../pluginSystem/WindowPlugin';
|
|
55
53
|
export { default as plugins } from '../pluginSystem/plugins';
|
|
56
54
|
export * as pluginsCtrl from '../pluginSystem/pluginsCtrl';
|
|
57
|
-
export * as Bar from '../uiClasses/Bar';
|
|
58
|
-
export * as BindedBar from '../uiClasses/BindedBar';
|
|
59
|
-
export * as BindedCheckbox from '../uiClasses/BindedCheckbox';
|
|
60
|
-
export * as BindedDropDown from '../uiClasses/BindedDropDown';
|
|
61
|
-
export * as BindedSwitch from '../uiClasses/BindedSwitch';
|
|
62
55
|
export * as BottomSlide from '../uiClasses/BottomSlide';
|
|
63
56
|
export * as ClickHandler from '../uiClasses/ClickHandler';
|
|
64
57
|
export * as Drag from '../uiClasses/Drag';
|
|
65
|
-
export * as DraggableDiv from '../uiClasses/DraggableDiv';
|
|
66
|
-
export * as DropDown from '../uiClasses/DropDown';
|
|
67
|
-
export * as GhostBox from '../uiClasses/GhostBox';
|
|
68
|
-
export * as LongTap from '../uiClasses/LongTap';
|
|
69
|
-
export * as MobileCalendar from '../uiClasses/MobileCalendar';
|
|
70
|
-
export * as ProductSwitch from '../uiClasses/ProductSwitch';
|
|
71
|
-
export * as Scrollable from '../uiClasses/Scrollable';
|
|
72
58
|
export * as Swipe from '../uiClasses/Swipe';
|
|
73
|
-
export * as Switch from '../uiClasses/Switch';
|
|
74
|
-
export * as TimestampBar from '../uiClasses/TimestampBar';
|
|
75
|
-
export * as Webcams from '../uiClasses/Webcams';
|
|
76
59
|
export * as Window from '../uiClasses/Window';
|
|
77
|
-
export * as loadersUI from '../ui/loadersUI';
|
|
78
60
|
export * as rhMessage from '../ui/rhMessage';
|
|
79
61
|
export * as timeAnimation from '../ui/timeAnimation';
|
|
80
62
|
export * as visibility from '../ui/visibility';
|
|
@@ -94,19 +76,19 @@ export { default as glTileRender } from '../render/glTileRender';
|
|
|
94
76
|
export * as renderTile from '../render/renderTile';
|
|
95
77
|
export * as tileLayer from '../render/tileLayerInstance';
|
|
96
78
|
export { default as GlObj } from '../wgUtils/GlObj';
|
|
97
|
-
export * as Favs from '../mapClasses/Favs';
|
|
98
79
|
export { default as LabelsLayer } from '../mapClasses/LabelsLayer';
|
|
99
80
|
export { default as LandMask } from '../mapClasses/LandMask';
|
|
100
81
|
export { default as TileLayerMultiPatch } from '../mapClasses/TileLayerMultiPatch';
|
|
101
|
-
export
|
|
82
|
+
export * as cityLabels from '../map/cityLabels';
|
|
102
83
|
export * as map from '../map/map';
|
|
103
84
|
export * as mapGlobeCtrl from '../map/mapGlobeCtrl';
|
|
104
85
|
export * as picker from '../map/picker';
|
|
105
86
|
export * as singleclick from '../map/singleclick';
|
|
106
|
-
export
|
|
107
|
-
export * as location from '../dummyModules/location';
|
|
108
|
-
export { default as log } from '../dummyModules/log';
|
|
87
|
+
export * as log from '../dummyModules/log';
|
|
109
88
|
export { default as promo } from '../dummyModules/promo';
|
|
110
|
-
export * as router from '../dummyModules/router';
|
|
111
89
|
export { default as seoParser } from '../dummyModules/seoParser';
|
|
90
|
+
export * as location from '../dummyModules/location';
|
|
91
|
+
export * as router from '../dummyModules/router';
|
|
92
|
+
export * as showableErrorsService from '../dummyModules/showableErrorsService';
|
|
93
|
+
export * as userFavs from '../dummyModules/userFavs';
|
|
112
94
|
export { default as libHtml } from '../lib/libHtml';
|