@windycom/plugin-devtools 2.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/BottomSlide.d.ts +3 -0
- package/types/client/BottomSveltePlugins.d.ts +8 -0
- package/types/client/Calendar.d.ts +9 -17
- package/types/client/Color.d.ts +44 -91
- package/types/client/EcmwfProduct.d.ts +0 -22
- package/types/client/Evented.d.ts +4 -0
- package/types/client/ExternalSveltePlugin.d.ts +8 -2
- package/types/client/IDB.d.ts +69 -0
- package/types/client/IconProducts.d.ts +2 -0
- package/types/client/Layer.d.ts +1 -2
- package/types/client/Metric.d.ts +13 -9
- package/types/client/MetricClasses.d.ts +4 -3
- package/types/client/Overlay.d.ts +31 -16
- package/types/client/OverlayClasses.d.ts +11 -7
- package/types/client/Plugin.d.ts +6 -2
- package/types/client/Product.d.ts +33 -30
- package/types/client/RadarPlusProduct.d.ts +19 -0
- package/types/client/Renderer.d.ts +2 -10
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/SveltePlugin.d.ts +16 -5
- package/types/client/TileLayer.d.ts +1 -2
- package/types/client/TopoMap.d.ts +10 -0
- package/types/client/WindowPlugin.d.ts +9 -4
- package/types/client/appsFlyer.d.ts +2 -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/compatibilityCheck.d.ts +1 -0
- package/types/client/connection.d.ts +1 -1
- package/types/client/customColors.d.ts +1 -0
- package/types/client/d.ts.files/Calendar.d.ts +11 -2
- package/types/client/d.ts.files/Color.d.ts +17 -5
- package/types/client/d.ts.files/LabelsLayer.d.ts +3 -20
- 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 +119 -0
- package/types/client/d.ts.files/broadcast.d.ts +51 -18
- package/types/client/d.ts.files/dataSpecifications.d.ts +121 -137
- package/types/client/d.ts.files/favs.d.ts +68 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
- package/types/client/d.ts.files/lib.d.ts +5 -7
- package/types/client/d.ts.files/notifications.d.ts +2 -2
- package/types/client/d.ts.files/plugin-params.d.ts +53 -57
- package/types/client/d.ts.files/plugins.d.ts +31 -42
- package/types/client/d.ts.files/pois.d.ts +1 -1
- package/types/client/d.ts.files/products.d.ts +16 -5
- package/types/client/d.ts.files/rootScope.d.ts +13 -31
- package/types/client/d.ts.files/startup.d.ts +65 -0
- package/types/client/d.ts.files/storage.d.ts +12 -35
- package/types/client/d.ts.files/user.d.ts +82 -24
- package/types/client/detectDevice.d.ts +0 -3
- package/types/client/device.d.ts +1 -0
- package/types/client/deviceLogging.d.ts +2 -1
- package/types/client/embed.d.ts +70 -0
- package/types/client/embed2.d.ts +14 -31
- package/types/client/errorLogger.d.ts +28 -3
- package/types/client/errors.d.ts +6 -0
- package/types/client/fetch.d.ts +41 -16
- package/types/client/format.d.ts +1 -1
- package/types/client/ga.d.ts +1 -1
- package/types/client/geolocation.d.ts +15 -7
- package/types/client/globals.d.ts +1 -0
- package/types/client/http.d.ts +17 -6
- package/types/client/idbInstances.d.ts +36 -0
- package/types/client/imaker.d.ts +112 -0
- package/types/client/imakerMain.d.ts +49 -0
- package/types/client/langFiles.d.ts +2 -0
- package/types/client/latestBroadcasts.d.ts +1 -1
- package/types/client/layers.d.ts +2 -0
- package/types/client/lib.d.ts +6 -22
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/liveAlerts.d.ts +5 -0
- package/types/client/liveAlerts.types.d.ts +28 -0
- package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
- package/types/client/location.d.ts +5 -0
- package/types/client/log.d.ts +4 -1
- package/types/client/lruCache.d.ts +6 -0
- package/types/client/map.d.ts +17 -6
- package/types/client/mobile.d.ts +31 -22
- package/types/client/models.d.ts +7 -5
- package/types/client/notifications.d.ts +29 -67
- package/types/client/overlays.d.ts +4 -1
- package/types/client/params.d.ts +0 -1
- package/types/client/permanentPromos.d.ts +1 -1
- package/types/client/persistentStorage.d.ts +8 -0
- package/types/client/picker.d.ts +1 -1
- package/types/client/plugins.d.ts +4 -0
- package/types/client/pois.d.ts +1 -2
- package/types/client/promo.d.ts +6 -16
- package/types/client/pushNotifications.d.ts +1 -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 +23 -24
- package/types/client/router.d.ts +9 -29
- package/types/client/seoParser.d.ts +0 -14
- package/types/client/serviceWorkerCtrl.d.ts +8 -0
- package/types/client/showableErrorsService.d.ts +6 -10
- package/types/client/startupWeather.d.ts +13 -9
- package/types/client/store.d.ts +2 -2
- package/types/client/storeLastPosition.d.ts +4 -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 +7 -13
- package/types/client/userAlerts.d.ts +68 -0
- package/types/client/userConsent.d.ts +6 -0
- package/types/client/userFavs.d.ts +46 -122
- package/types/client/utils.d.ts +67 -9
- package/types/iconfont.d.ts +8 -0
- package/types/interfaces.d.ts +226 -284
- package/types/lang-files.d.ts +1334 -142
- package/types/offline.d.ts +100 -0
- package/types/types.d.ts +108 -34
- 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/BindedSwitch.d.ts +0 -35
- package/types/client/BottomTagPlugin.d.ts +0 -8
- package/types/client/DraggableDiv.d.ts +0 -21
- 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 -51
- 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/d.ts.files/Product.d.ts +0 -37
- package/types/client/d.ts.files/errorLogger.d.ts +0 -35
- package/types/client/d.ts.files/trans.d.ts +0 -55
- package/types/client/favs.d.ts +0 -83
- package/types/client/offlineController.d.ts +0 -20
- /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
|
@@ -1,35 +1,59 @@
|
|
|
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
|
+
|
|
24
|
+
/** Consent to receive newsletter; */
|
|
25
|
+
marketingConsent?: boolean;
|
|
26
|
+
}
|
|
4
27
|
|
|
5
28
|
/**
|
|
6
29
|
* user info as it's returned from account or node users
|
|
7
30
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
31
|
+
export type UserInfo = {
|
|
32
|
+
/** aka userToken in storage */
|
|
33
|
+
token: string;
|
|
34
|
+
} & (
|
|
35
|
+
| {
|
|
36
|
+
auth: false;
|
|
37
|
+
userInfo: {
|
|
38
|
+
requiresCookieConsent: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
| {
|
|
42
|
+
/** true if user is authenticated */
|
|
43
|
+
auth: true;
|
|
13
44
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
token?: string;
|
|
45
|
+
/** @deprecated */
|
|
46
|
+
subscription?: SubTier;
|
|
18
47
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* tier level of user premium - TODO remove
|
|
22
|
-
*/
|
|
23
|
-
subscription?: SubTier;
|
|
48
|
+
/** Detail info about subscription. It is undefined if no subscription is available for the user. */
|
|
49
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
24
50
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
userInfo?: User;
|
|
32
|
-
}
|
|
51
|
+
/**
|
|
52
|
+
* user as in storage definition
|
|
53
|
+
*/
|
|
54
|
+
userInfo: User;
|
|
55
|
+
}
|
|
56
|
+
);
|
|
33
57
|
|
|
34
58
|
/**
|
|
35
59
|
* @typedef {Object} LoginResponse login response as it's returned from account or node login
|
|
@@ -56,3 +80,37 @@ export interface AccountLoginResponse {
|
|
|
56
80
|
*/
|
|
57
81
|
authHash: string;
|
|
58
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* In order to motivate users to register/login, we show login/register popup
|
|
86
|
+
* in certain situations. This object contains
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
export type LoginAndFinishAction =
|
|
90
|
+
| {
|
|
91
|
+
action: 'addFav';
|
|
92
|
+
params: FavFragment;
|
|
93
|
+
}
|
|
94
|
+
| {
|
|
95
|
+
action: 'alerts-edit';
|
|
96
|
+
params: PluginsOpenParams['alerts-edit'];
|
|
97
|
+
}
|
|
98
|
+
| {
|
|
99
|
+
action: 'uploader';
|
|
100
|
+
params: PluginsOpenParams['uploader'];
|
|
101
|
+
}
|
|
102
|
+
| {
|
|
103
|
+
action: 'favs';
|
|
104
|
+
params: PluginsOpenParams['favs'];
|
|
105
|
+
}
|
|
106
|
+
| {
|
|
107
|
+
action: 'colors';
|
|
108
|
+
params: PluginsOpenParams['colors'];
|
|
109
|
+
}
|
|
110
|
+
| {
|
|
111
|
+
action: 'openExternalPlugin';
|
|
112
|
+
params: {
|
|
113
|
+
name: ExternalPluginIdent;
|
|
114
|
+
openParams: PluginsOpenParams['windy-external-plugin'];
|
|
115
|
+
};
|
|
116
|
+
};
|
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>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import './leafletExt/CanvasLayer';
|
|
2
|
+
import './services/params';
|
|
3
|
+
import './pluginSystem/Plugin';
|
|
4
|
+
import './pluginSystem/SveltePlugin';
|
|
5
|
+
import './pluginSystem/TagPlugin';
|
|
6
|
+
import './pluginSystem/WindowPlugin';
|
|
7
|
+
import './pluginSystem/pluginsCtrl';
|
|
8
|
+
import './ui/timeAnimation';
|
|
9
|
+
import './ui/visibility';
|
|
10
|
+
import './render/renderTile';
|
|
11
|
+
import './render/tileLayerInstance';
|
|
12
|
+
export * as detectDevice from './dummyModules/detectDevice';
|
|
13
|
+
export * as log from './dummyModules/log';
|
|
14
|
+
export * as promo from './dummyModules/promo';
|
|
15
|
+
export * as location from './dummyModules/location';
|
|
16
|
+
export * as router from './dummyModules/router';
|
|
17
|
+
export * as showableErrorsService from './dummyModules/showableErrorsService';
|
|
18
|
+
export * as userFavs from './dummyModules/userFavs';
|
|
19
|
+
export * as share from './dummyModules/share';
|
|
20
|
+
import bcast from './services/broadcast';
|
|
21
|
+
import * as rootScope from './services/rootScope';
|
|
22
|
+
import { default as store } from './services/store';
|
|
23
|
+
export * as user from './services/user';
|
|
24
|
+
import * as ga from './utils/ga';
|
|
25
|
+
import { $ } from './utils/utils';
|
|
26
|
+
import { default as overlays } from './weather/overlays';
|
|
27
|
+
export { rootScope };
|
|
28
|
+
export * as map from './map/map';
|
|
29
|
+
export * as baseMap from './map/baseMap';
|
|
30
|
+
export * as cityLabels from './map/cityLabels';
|
|
31
|
+
export * as mapGlobeCtrl from './map/mapGlobeCtrl';
|
|
32
|
+
export * as picker from './map/picker';
|
|
33
|
+
export * as singleclick from './map/singleclick';
|
|
34
|
+
export { default as plugins } from './pluginSystem/plugins';
|
|
35
|
+
export * as interpolator from './render/interpolator';
|
|
36
|
+
export { default as particleRenderers } from './render/particleRenderers';
|
|
37
|
+
export * as renderUtils from './render/renderUtils';
|
|
38
|
+
export * as DataTiler from './renderClasses/DataTiler';
|
|
39
|
+
export { default as colors } from './services/colors';
|
|
40
|
+
export * as connection from './services/connection';
|
|
41
|
+
export * as device from './services/device';
|
|
42
|
+
export * as geolocation from './services/geolocation';
|
|
43
|
+
export * as notifications from './services/notifications';
|
|
44
|
+
export * as pois from './services/pois';
|
|
45
|
+
export * as reverseName from './services/reverseName';
|
|
46
|
+
export * as trans from './services/trans';
|
|
47
|
+
export * as query from './ui/query';
|
|
48
|
+
export * as rhMessage from './ui/rhMessage';
|
|
49
|
+
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
50
|
+
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
51
|
+
export * as Drag from './uiClasses/Drag';
|
|
52
|
+
export * as Swipe from './uiClasses/Swipe';
|
|
53
|
+
export * as Window from './uiClasses/Window';
|
|
54
|
+
export * as Evented from './utils/Evented';
|
|
55
|
+
export * as errorLogger from './utils/errorLogger';
|
|
56
|
+
export * as fetch from './utils/fetch';
|
|
57
|
+
export * as format from './utils/format';
|
|
58
|
+
export * as http from './utils/http';
|
|
59
|
+
export { default as lruCache } from './utils/lruCache';
|
|
60
|
+
export { default as storage } from './utils/storage';
|
|
61
|
+
export * as subscription from './utils/subscription';
|
|
62
|
+
export * as utils from './utils/utils';
|
|
63
|
+
export { default as metrics } from './weather/metrics';
|
|
64
|
+
export * as models from './weather/models';
|
|
65
|
+
export { default as products } from './weather/products';
|
|
66
|
+
export * as Calendar from './weatherClasses/Calendar';
|
|
67
|
+
export * as Color from './weatherClasses/Color';
|
|
68
|
+
export * as IconProducts from './weatherClasses/IconProducts';
|
|
69
|
+
export { default as GlObj } from './wgUtils/GlObj';
|
|
70
|
+
export { $, bcast as broadcast, ga, overlays, store };
|
package/types/client/embed2.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
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';
|
|
@@ -12,27 +10,27 @@ import './ui/components';
|
|
|
12
10
|
import './ui/timeAnimation';
|
|
13
11
|
import './ui/visibility';
|
|
14
12
|
import './render/renderTile';
|
|
15
|
-
import './render/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
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';
|
|
25
22
|
import bcast from './services/broadcast';
|
|
26
23
|
import * as rootScope from './services/rootScope';
|
|
27
24
|
import { default as store } from './services/store';
|
|
25
|
+
export * as user from './services/user';
|
|
28
26
|
import * as ga from './utils/ga';
|
|
29
27
|
import { $ } from './utils/utils';
|
|
30
28
|
import { default as overlays } from './weather/overlays';
|
|
31
29
|
export { rootScope };
|
|
32
|
-
export * as progressBar from '../plugins/progress-bar/progress-bar';
|
|
33
|
-
export * as location from './dummyModules/location';
|
|
34
|
-
export * as router from './dummyModules/router';
|
|
35
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';
|
|
36
34
|
export * as picker from './map/picker';
|
|
37
35
|
export * as singleclick from './map/singleclick';
|
|
38
36
|
export { default as plugins } from './pluginSystem/plugins';
|
|
@@ -44,32 +42,17 @@ export { default as colors } from './services/colors';
|
|
|
44
42
|
export * as connection from './services/connection';
|
|
45
43
|
export * as device from './services/device';
|
|
46
44
|
export * as geolocation from './services/geolocation';
|
|
47
|
-
export
|
|
45
|
+
export * as notifications from './services/notifications';
|
|
48
46
|
export * as pois from './services/pois';
|
|
49
47
|
export * as reverseName from './services/reverseName';
|
|
50
|
-
export * as showableErrorsService from './services/showableErrorsService';
|
|
51
48
|
export * as trans from './services/trans';
|
|
52
49
|
export * as startupWeather from './ui/startupWeather';
|
|
53
|
-
export * as promo from './ui/promo';
|
|
54
50
|
export * as query from './ui/query';
|
|
55
51
|
export * as rhMessage from './ui/rhMessage';
|
|
56
|
-
export * as user from './ui/user';
|
|
57
|
-
export * as BindedBar from './uiClasses/BindedBar';
|
|
58
|
-
export * as BindedCheckbox from './uiClasses/BindedCheckbox';
|
|
59
|
-
export * as BindedSwitch from './uiClasses/BindedSwitch';
|
|
60
52
|
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
61
53
|
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
62
54
|
export * as Drag from './uiClasses/Drag';
|
|
63
|
-
export * as DraggableDiv from './uiClasses/DraggableDiv';
|
|
64
|
-
export * as GhostBox from './uiClasses/GhostBox';
|
|
65
|
-
export * as Legend from './uiClasses/Legend';
|
|
66
|
-
export * as LongTap from './uiClasses/LongTap';
|
|
67
|
-
export * as MobileCalendar from './uiClasses/MobileCalendar';
|
|
68
|
-
export * as ProductSwitch from './uiClasses/ProductSwitch';
|
|
69
|
-
export * as Scrollable from './uiClasses/Scrollable';
|
|
70
55
|
export * as Swipe from './uiClasses/Swipe';
|
|
71
|
-
export * as Switch from './uiClasses/Switch';
|
|
72
|
-
export * as TimestampBar from './uiClasses/TimestampBar';
|
|
73
56
|
export * as Window from './uiClasses/Window';
|
|
74
57
|
export * as Evented from './utils/Evented';
|
|
75
58
|
export * as errorLogger from './utils/errorLogger';
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* catches all runtimes exceptions and sends them to kibana on backend.
|
|
3
|
-
* Defines global `logError( moduleName, msg, errObj )` for custom err
|
|
4
|
-
* Licences go here since this is the first minified file
|
|
3
|
+
* Defines global `logError( moduleName, msg, errObj )` for custom err leggin.
|
|
5
4
|
*/
|
|
6
|
-
import type {
|
|
5
|
+
import type { Overlays } from '@windy/rootScope.d';
|
|
6
|
+
import type { Device, Platform, Timestamp } from '@windy/types';
|
|
7
|
+
type RunningPhase = '1_loading' | '2_dependenciesResolved' | '3_redrawFinished' | 'documentIsHidden';
|
|
8
|
+
type ErrorTypes = 'error' | 'customLogError' | 'unhandledRejection';
|
|
9
|
+
/** Payload sent to backend */
|
|
10
|
+
interface ErrorPayload {
|
|
11
|
+
errorID: string;
|
|
12
|
+
type: ErrorTypes;
|
|
13
|
+
platform: Platform;
|
|
14
|
+
device: Device;
|
|
15
|
+
ver: string;
|
|
16
|
+
target: 'index' | 'mobile' | 'embed' | 'lib' | 'imaker';
|
|
17
|
+
msg: string;
|
|
18
|
+
timestamp: Timestamp;
|
|
19
|
+
runningMinutes: number;
|
|
20
|
+
runningPhase: RunningPhase;
|
|
21
|
+
overlay: Overlays;
|
|
22
|
+
url: string;
|
|
23
|
+
module?: string;
|
|
24
|
+
line?: number;
|
|
25
|
+
col?: number;
|
|
26
|
+
script?: string;
|
|
27
|
+
stack?: string;
|
|
28
|
+
repeated?: number;
|
|
29
|
+
latestBcast?: string;
|
|
30
|
+
}
|
|
7
31
|
/**
|
|
8
32
|
* Array of all errors reported to kibana, to show them in debug mode
|
|
9
33
|
* plugin
|
|
10
34
|
*/
|
|
11
35
|
export declare const sentErrors: ErrorPayload[];
|
|
36
|
+
export {};
|
package/types/client/fetch.d.ts
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* # @windy/fetch
|
|
3
|
+
*
|
|
4
|
+
* Basic HTTP requests for getting URLs of our
|
|
5
|
+
* backend services or fetching data from Windy API.
|
|
6
|
+
* Although it works as wrapper around our {@link http} module,
|
|
7
|
+
* it ensures standardized way of fetching data.
|
|
8
|
+
*
|
|
9
|
+
* @module fetch
|
|
10
|
+
*/
|
|
11
|
+
import * as http from '@windy/http';
|
|
12
|
+
import type { CityTemperaturesDto } from '@windy-types/citytile2';
|
|
13
|
+
import type { DataHash, LatLon, MeteogramDataPayload, WeatherDataPayload, CapAlertHeadline, ActiveStormCountPayload } from '@windy/interfaces.d';
|
|
3
14
|
import type { Pois, Products } from '@windy/rootScope.d';
|
|
4
|
-
import type { ExtendedStationType } from '@windy/types';
|
|
5
|
-
import type { HttpOptions, HttpPayload } from '
|
|
15
|
+
import type { ExtendedStationType, StationOrPoiType } from '@windy/types';
|
|
16
|
+
import type { HttpOptions, HttpPayload, QueryStringSource } from '@windy/http.d';
|
|
6
17
|
interface LatLonStep extends LatLon {
|
|
7
18
|
step?: number;
|
|
8
19
|
interpolate?: boolean;
|
|
9
20
|
}
|
|
10
|
-
/**
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
export declare const getReftimeIso: (model: Products) => any;
|
|
14
21
|
/**
|
|
15
22
|
* Returns URL for webcam detail by id
|
|
16
23
|
*
|
|
@@ -54,6 +61,16 @@ export declare const getSearchWebcamViewsUrl: (textQuery: string, latLon?: LatLo
|
|
|
54
61
|
* @ignore
|
|
55
62
|
*/
|
|
56
63
|
export declare const getWebcamMetricsUrl: (id: string | number) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Gets point forecast data URL for given location
|
|
66
|
+
*
|
|
67
|
+
* @param model Forecast model
|
|
68
|
+
* @param params LalLon of the location and additional parameters
|
|
69
|
+
* @param pointForecastOptions Additional options of point forecast API
|
|
70
|
+
* @param httpOptions Additional HTTP options
|
|
71
|
+
* @returns URL string for getting point forecast data
|
|
72
|
+
*/
|
|
73
|
+
export declare const getPointForecastUrl: <T extends LatLonStep>(model: Products, { lat, lon, step, interpolate }: T, pointForecastOptions?: Record<string, string>) => Promise<string>;
|
|
57
74
|
/**
|
|
58
75
|
* Gets point forecast data for given location
|
|
59
76
|
*
|
|
@@ -63,34 +80,33 @@ export declare const getWebcamMetricsUrl: (id: string | number) => string;
|
|
|
63
80
|
* @param httpOptions Additional HTTP options
|
|
64
81
|
* @returns Promise with HTTP payload
|
|
65
82
|
*/
|
|
66
|
-
export declare const getPointForecastData: <T extends LatLonStep>(model: Products,
|
|
83
|
+
export declare const getPointForecastData: <T extends LatLonStep>(model: Products, latLonStepInterpolate: T, pointForecastOptions?: Record<string, string>, httpOptions?: HttpOptions) => Promise<HttpPayload<WeatherDataPayload<DataHash>>>;
|
|
67
84
|
/**
|
|
68
85
|
* Gets enhanced point forecast meteogram data for given location
|
|
69
86
|
* @returns Promise with HTTP payload
|
|
70
87
|
*/
|
|
71
|
-
export declare const
|
|
88
|
+
export declare const getMeteogramForecastUrl: <T extends LatLonStep>(model: Products, { lat, lon, step }: T, pointForecastOptions?: Record<string, string>) => Promise<string>;
|
|
72
89
|
/**
|
|
73
|
-
*
|
|
74
|
-
* @
|
|
90
|
+
* Gets enhanced point forecast meteogram data for given location
|
|
91
|
+
* @returns Promise with HTTP payload
|
|
75
92
|
*/
|
|
76
|
-
export declare const
|
|
93
|
+
export declare const getMeteogramForecastData: <T extends LatLonStep>(model: Products, latLonStep: T, pointForecastOptions?: Record<string, string>, httpOptions?: HttpOptions) => Promise<HttpPayload<MeteogramDataPayload>>;
|
|
77
94
|
/**
|
|
78
95
|
* Returns URL for getting citytile forecast
|
|
79
96
|
*
|
|
80
97
|
* @param model Forecast model
|
|
81
98
|
* @param frag Mercator frag in {z}/{x}/{y} format
|
|
82
|
-
* @param options HTTP options
|
|
83
99
|
* @returns URL for getting citytile forecast
|
|
84
100
|
* @ignore
|
|
85
101
|
*/
|
|
86
|
-
export declare const getCitytileData: (model: Products, frag: string
|
|
102
|
+
export declare const getCitytileData: (model: Products, frag: string) => Promise<HttpPayload<CityTemperaturesDto> | null>;
|
|
87
103
|
/**
|
|
88
104
|
* Returns URL for nearest POI items (stations, airQ, ...)
|
|
89
105
|
* @param param0
|
|
90
106
|
* @returns URL for getting nearest POI items
|
|
91
107
|
* @ignore
|
|
92
108
|
*/
|
|
93
|
-
export declare const getNearestPoiItemsUrl: (type: Pois | 'stations', { lat, lon }: LatLon) => string;
|
|
109
|
+
export declare const getNearestPoiItemsUrl: (type: Pois | 'stations', { lat, lon }: LatLon, options?: QueryStringSource) => string;
|
|
94
110
|
/**
|
|
95
111
|
* Returns URL for tide forecast
|
|
96
112
|
* @ignore
|
|
@@ -106,4 +122,13 @@ export declare const getTidePoiUrl: (id: string) => string;
|
|
|
106
122
|
* @ignore
|
|
107
123
|
*/
|
|
108
124
|
export declare const getObservationsUrl: (type: ExtendedStationType, id: string, daysFrom: number, daysTo?: number) => string;
|
|
125
|
+
/**
|
|
126
|
+
* Get URL for getting observations for a specific station in node-poi server
|
|
127
|
+
*/
|
|
128
|
+
export declare const getObservationPoiUrl: (type: StationOrPoiType | 'stations', id: string) => string;
|
|
129
|
+
/**
|
|
130
|
+
* Returns loading promise for cap alert headlines
|
|
131
|
+
*/
|
|
132
|
+
export declare const getCapAlertsSummary: ({ lat, lon }: LatLon) => Promise<http.HttpPayload<CapAlertHeadline[]>>;
|
|
133
|
+
export declare const getHurricanesCount: () => Promise<HttpPayload<ActiveStormCountPayload>>;
|
|
109
134
|
export {};
|
package/types/client/format.d.ts
CHANGED
|
@@ -99,4 +99,4 @@ export declare const seoLang: (lang: string) => string;
|
|
|
99
99
|
* @param viewcount Number to show at animation end
|
|
100
100
|
* @param el HTML element where animate counting and show the final number
|
|
101
101
|
*/
|
|
102
|
-
export declare const animateViews: (viewcount: number, el: HTMLElement) => void;
|
|
102
|
+
export declare const animateViews: (viewcount: number, el: HTMLElement, useViewsText?: boolean) => void;
|
package/types/client/ga.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@windy/router';
|
|
2
2
|
import type { GeolocationInfo, HomeLocation } from '@windy/interfaces.d';
|
|
3
|
+
import type { PositionOptions } from '@capacitor/geolocation';
|
|
3
4
|
/**
|
|
4
5
|
* Returns either GPS or IP location whichever is newer.
|
|
5
6
|
*
|
|
@@ -10,13 +11,21 @@ import type { GeolocationInfo, HomeLocation } from '@windy/interfaces.d';
|
|
|
10
11
|
* @returns Location got from GPS or IP, the newer is preferred
|
|
11
12
|
*/
|
|
12
13
|
export declare const getMyLatestPos: () => GeolocationInfo;
|
|
14
|
+
interface GeolocationOptions extends PositionOptions {
|
|
15
|
+
doNotShowSearchGPSMessage?: boolean;
|
|
16
|
+
doNotShowFailureMessage?: boolean;
|
|
17
|
+
getMeFallbackGps?: boolean;
|
|
18
|
+
}
|
|
13
19
|
/**
|
|
14
20
|
* Returns promise on GPS based location with GeoIP location as a fallback.
|
|
15
21
|
*
|
|
16
|
-
*
|
|
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
|
|
17
26
|
* @returns Geolocation info from GPS, GeoIP as a fallback
|
|
18
27
|
*/
|
|
19
|
-
export declare const getGPSlocation: (options?:
|
|
28
|
+
export declare const getGPSlocation: (options?: GeolocationOptions) => Promise<GeolocationInfo>;
|
|
20
29
|
/**
|
|
21
30
|
* Returns fallback name created from lat,lon if nothing else can be used
|
|
22
31
|
*
|
|
@@ -28,10 +37,9 @@ export declare const getGPSlocation: (options?: PositionOptions) => Promise<Geol
|
|
|
28
37
|
*/
|
|
29
38
|
export declare const getFallbackName: (lat: number | string, lon: number | string) => string;
|
|
30
39
|
/**
|
|
31
|
-
* Gets accurate home location. Cannot be used in map initialization
|
|
32
|
-
*
|
|
33
|
-
* @param cb Callback function to call when location is get. Location info object is passed as a callback argument
|
|
34
|
-
*
|
|
40
|
+
* Gets accurate home location. Cannot be used in map initialization because it is async.
|
|
35
41
|
* @ignore
|
|
36
42
|
*/
|
|
37
|
-
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,13 +2,16 @@
|
|
|
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
|
-
export declare class HttpError extends Error {
|
|
7
|
-
status: number;
|
|
8
|
-
message: string;
|
|
9
|
-
responseText?: string;
|
|
10
|
-
constructor(status: number, message: string, responseText?: string);
|
|
11
|
-
}
|
|
12
15
|
/**
|
|
13
16
|
* Create Event Source for SSE with tokens for authentication
|
|
14
17
|
* Do not forget to close the EventSource, otherwise there will be an error event when the page closes.
|
|
@@ -51,6 +54,14 @@ export declare const post: StandardHttpRequestFun;
|
|
|
51
54
|
* @returns HTTP payload or null when anything failed
|
|
52
55
|
*/
|
|
53
56
|
export declare const put: StandardHttpRequestFun;
|
|
57
|
+
/**
|
|
58
|
+
* Make PATCH http request
|
|
59
|
+
*
|
|
60
|
+
* @param url Url
|
|
61
|
+
* @param options Options
|
|
62
|
+
* @returns HTTP payload or null when anything failed
|
|
63
|
+
*/
|
|
64
|
+
export declare const patch: StandardHttpRequestFun;
|
|
54
65
|
/**
|
|
55
66
|
* Make HEAD http request
|
|
56
67
|
*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IDB } from '@windy/IDB';
|
|
2
|
+
import type { MarkedNotams } from '@plugins/airport/airport';
|
|
3
|
+
import type { SearchRecent } from '@plugins/search/search';
|
|
4
|
+
import type { AnyColorIdent, UserColor } from '@windy/Color.d';
|
|
5
|
+
import type { AlertRequest, AlertResponse } from '@windy/alerts';
|
|
6
|
+
import type { Fav, FavFragment } from '@windy/favs.d';
|
|
7
|
+
import type { CapAlertSlided, InstalledExternalPluginConfig } from '@windy/interfaces';
|
|
8
|
+
import type { PromoInfoObject } from '@windy/promo';
|
|
9
|
+
import type { SeenArticle, SeenStory } from '@windy/startup.d';
|
|
10
|
+
export declare const initPromise: Promise<IDBDatabase>;
|
|
11
|
+
/** Db of stored user favourites */
|
|
12
|
+
export declare const userFavsIdb: IDB<string, Fav, FavFragment>;
|
|
13
|
+
export declare const searchRecentsIdb: IDB<string, SearchRecent, SearchRecent>;
|
|
14
|
+
/** Db of stored user alerts */
|
|
15
|
+
export declare const userAlertsIdb: IDB<string, AlertResponse, AlertRequest>;
|
|
16
|
+
/** Db of stored notams marked as read */
|
|
17
|
+
export declare const markedNotamsIdb: IDB<`${string}_${string}/${string}`, MarkedNotams, MarkedNotams>;
|
|
18
|
+
/** Seen articles */
|
|
19
|
+
export declare const seenArticlesIdb: IDB<string | number, SeenArticle, SeenArticle>;
|
|
20
|
+
/** Seen promos */
|
|
21
|
+
export declare const seenPromosIdb: IDB<string, PromoInfoObject, PromoInfoObject>;
|
|
22
|
+
/** Custom user colors */
|
|
23
|
+
export declare const customColorsIdb: IDB<AnyColorIdent, UserColor, UserColor>;
|
|
24
|
+
/** Cap alerts that were slided from left to right on startup screen */
|
|
25
|
+
export declare const slidedCapAlertsIdb: IDB<string, CapAlertSlided, CapAlertSlided>;
|
|
26
|
+
/** Seen stories */
|
|
27
|
+
export declare const seenStoriesIdb: IDB<string, SeenStory, SeenStory>;
|
|
28
|
+
/** Log of pages & events that happened on this device */
|
|
29
|
+
export declare const logIdb: IDB<`airport/${string}` | `articles/${string}` | `garmin/${string}` | `onboarding/${string}` | `station/${string}` | `subscription/${string}` | `pois/${string}` | `version/${string}` | `overlay/${string}` | `level/${string}` | `acRange/${string}` | `path/${string}` | `isolinesType/${string}` | `isolinesOn/${string}` | `product/${string}` | `plugin/${string}` | `startup/${string}` | `404/${string}` | `promo/${string}` | `appRating/${string}` | `appOpening/${string}` | `detail2/${string}` | `appsflyer/${string}` | `weather/${string}` | `events/${string}` | `locationPermissionPopup/${string}` | `widgetPromo/${string}` | `storyEvent/${string}`, number, number>;
|
|
30
|
+
/** Log of locations, that user uses on this device */
|
|
31
|
+
export declare const popularLocationsIdb: IDB<string, number, number>;
|
|
32
|
+
/** Seen stories */
|
|
33
|
+
export declare const likedStoryCommentsIdb: IDB<string, boolean, boolean>;
|
|
34
|
+
/** Installed external plugins */
|
|
35
|
+
export declare const installedPluginsIdb: IDB<`windy-plugin-${string}`, InstalledExternalPluginConfig, InstalledExternalPluginConfig>;
|
|
36
|
+
export declare const clearIndexedDB: () => Promise<void>;
|