@opengeoweb/api 9.28.0 → 9.29.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/index.esm.js CHANGED
@@ -2223,22 +2223,22 @@ $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2223
2223
  }
2224
2224
  });
2225
2225
 
2226
- /* *
2227
- * Licensed under the Apache License, Version 2.0 (the "License");
2228
- * you may not use this file except in compliance with the License.
2229
- * You may obtain a copy of the License at
2230
- *
2231
- * http://www.apache.org/licenses/LICENSE-2.0
2232
- *
2233
- * Unless required by applicable law or agreed to in writing, software
2234
- * distributed under the License is distributed on an "AS IS" BASIS,
2235
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2236
- * See the License for the specific language governing permissions and
2237
- * limitations under the License.
2238
- *
2239
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2240
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
2241
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2226
+ /* *
2227
+ * Licensed under the Apache License, Version 2.0 (the "License");
2228
+ * you may not use this file except in compliance with the License.
2229
+ * You may obtain a copy of the License at
2230
+ *
2231
+ * http://www.apache.org/licenses/LICENSE-2.0
2232
+ *
2233
+ * Unless required by applicable law or agreed to in writing, software
2234
+ * distributed under the License is distributed on an "AS IS" BASIS,
2235
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2236
+ * See the License for the specific language governing permissions and
2237
+ * limitations under the License.
2238
+ *
2239
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2240
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
2241
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2242
2242
  * */
2243
2243
  const getHeaders = auth => ({
2244
2244
  'Content-Type': 'application/json',
@@ -2268,28 +2268,28 @@ const getSigmetConfig = auth => {
2268
2268
  }).then(r => r.json());
2269
2269
  };
2270
2270
 
2271
- /* *
2272
- * Licensed under the Apache License, Version 2.0 (the "License");
2273
- * you may not use this file except in compliance with the License.
2274
- * You may obtain a copy of the License at
2275
- *
2276
- * http://www.apache.org/licenses/LICENSE-2.0
2277
- *
2278
- * Unless required by applicable law or agreed to in writing, software
2279
- * distributed under the License is distributed on an "AS IS" BASIS,
2280
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2281
- * See the License for the specific language governing permissions and
2282
- * limitations under the License.
2283
- *
2284
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2285
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
2286
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2271
+ /* *
2272
+ * Licensed under the Apache License, Version 2.0 (the "License");
2273
+ * you may not use this file except in compliance with the License.
2274
+ * You may obtain a copy of the License at
2275
+ *
2276
+ * http://www.apache.org/licenses/LICENSE-2.0
2277
+ *
2278
+ * Unless required by applicable law or agreed to in writing, software
2279
+ * distributed under the License is distributed on an "AS IS" BASIS,
2280
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2281
+ * See the License for the specific language governing permissions and
2282
+ * limitations under the License.
2283
+ *
2284
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2285
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
2286
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2287
2287
  * */
2288
- /**
2289
- * ProductStatus is returned by the backend. The backend fills in this property.
2290
- * For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
2291
- * The backend should derive and return the status 'EXPIRED' from the product properties.
2292
- *
2288
+ /**
2289
+ * ProductStatus is returned by the backend. The backend fills in this property.
2290
+ * For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
2291
+ * The backend should derive and return the status 'EXPIRED' from the product properties.
2292
+ *
2293
2293
  * Note: ProductStatus from the backend should be refreshed regularly to display status updates. */
2294
2294
  var ProductStatus;
2295
2295
  (function (ProductStatus) {
@@ -2310,8 +2310,8 @@ var CloudLevelUnits;
2310
2310
  CloudLevelUnits["FT"] = "ft";
2311
2311
  CloudLevelUnits["M"] = "m";
2312
2312
  })(CloudLevelUnits || (CloudLevelUnits = {}));
2313
- /**
2314
- * The possible phenomena for the sigmet
2313
+ /**
2314
+ * The possible phenomena for the sigmet
2315
2315
  */
2316
2316
  var SigmetPhenomena;
2317
2317
  (function (SigmetPhenomena) {
@@ -2333,8 +2333,8 @@ var SigmetPhenomena;
2333
2333
  // 'TC' = 'Tropical cyclone', // Don't show this option in the list because it will be not used by KNMI.
2334
2334
  SigmetPhenomena["VA_CLD"] = "Volcanic ash cloud";
2335
2335
  })(SigmetPhenomena || (SigmetPhenomena = {}));
2336
- /**
2337
- * The possible phenomena for the airmet
2336
+ /**
2337
+ * The possible phenomena for the airmet
2338
2338
  */
2339
2339
  var AirmetPhenomena;
2340
2340
  (function (AirmetPhenomena) {
@@ -2411,22 +2411,22 @@ var VisibilityCause;
2411
2411
  VisibilityCause["VA"] = "Volcanic Ash";
2412
2412
  })(VisibilityCause || (VisibilityCause = {}));
2413
2413
 
2414
- /* *
2415
- * Licensed under the Apache License, Version 2.0 (the "License");
2416
- * you may not use this file except in compliance with the License.
2417
- * You may obtain a copy of the License at
2418
- *
2419
- * http://www.apache.org/licenses/LICENSE-2.0
2420
- *
2421
- * Unless required by applicable law or agreed to in writing, software
2422
- * distributed under the License is distributed on an "AS IS" BASIS,
2423
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2424
- * See the License for the specific language governing permissions and
2425
- * limitations under the License.
2426
- *
2427
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2428
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
2429
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2414
+ /* *
2415
+ * Licensed under the Apache License, Version 2.0 (the "License");
2416
+ * you may not use this file except in compliance with the License.
2417
+ * You may obtain a copy of the License at
2418
+ *
2419
+ * http://www.apache.org/licenses/LICENSE-2.0
2420
+ *
2421
+ * Unless required by applicable law or agreed to in writing, software
2422
+ * distributed under the License is distributed on an "AS IS" BASIS,
2423
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2424
+ * See the License for the specific language governing permissions and
2425
+ * limitations under the License.
2426
+ *
2427
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2428
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
2429
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2430
2430
  * */
2431
2431
  const useAirmetList = () => {
2432
2432
  const {
@@ -2451,22 +2451,22 @@ const useSigmetList = () => {
2451
2451
  return data;
2452
2452
  };
2453
2453
 
2454
- /* *
2455
- * Licensed under the Apache License, Version 2.0 (the "License");
2456
- * you may not use this file except in compliance with the License.
2457
- * You may obtain a copy of the License at
2458
- *
2459
- * http://www.apache.org/licenses/LICENSE-2.0
2460
- *
2461
- * Unless required by applicable law or agreed to in writing, software
2462
- * distributed under the License is distributed on an "AS IS" BASIS,
2463
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2464
- * See the License for the specific language governing permissions and
2465
- * limitations under the License.
2466
- *
2467
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2468
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
2469
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2454
+ /* *
2455
+ * Licensed under the Apache License, Version 2.0 (the "License");
2456
+ * you may not use this file except in compliance with the License.
2457
+ * You may obtain a copy of the License at
2458
+ *
2459
+ * http://www.apache.org/licenses/LICENSE-2.0
2460
+ *
2461
+ * Unless required by applicable law or agreed to in writing, software
2462
+ * distributed under the License is distributed on an "AS IS" BASIS,
2463
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2464
+ * See the License for the specific language governing permissions and
2465
+ * limitations under the License.
2466
+ *
2467
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2468
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
2469
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2470
2470
  * */
2471
2471
  const API_NAMESPACE = 'api';
2472
2472
  // Initialize and create provider if needed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/api",
3
- "version": "9.28.0",
3
+ "version": "9.29.0",
4
4
  "description": "GeoWeb API library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/i18n.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const API_NAMESPACE = "api";
1
+ export declare const API_NAMESPACE = "api";
package/src/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from '@opengeoweb/authentication';
2
- export * from './sigmet-airmet-api/api';
3
- export * from './sigmet-airmet-api/types';
4
- export * from './sigmet-airmet-api/definitions';
5
- export * from './sigmet-airmet-api/hooks';
6
- export { API_NAMESPACE } from './i18n';
1
+ export * from '@opengeoweb/authentication';
2
+ export * from './sigmet-airmet-api/api';
3
+ export * from './sigmet-airmet-api/types';
4
+ export * from './sigmet-airmet-api/definitions';
5
+ export * from './sigmet-airmet-api/hooks';
6
+ export { API_NAMESPACE } from './i18n';
@@ -1,8 +1,8 @@
1
- import { Credentials } from '@opengeoweb/authentication';
2
- import { AirmetFromBackend, SigmetFromBackend } from './types';
3
- import { AirmetConfig, SigmetConfig } from './config-types';
4
- export declare const getAirmetList: (auth: Credentials) => Promise<AirmetFromBackend[]>;
5
- export declare const getSigmetList: (auth: Credentials) => Promise<SigmetFromBackend[]>;
6
- export declare const getlocalProductConfig: <T extends SigmetConfig | AirmetConfig>(configUrl: string) => Promise<T>;
7
- export declare const getAirmetConfig: (auth: Credentials) => Promise<AirmetConfig>;
8
- export declare const getSigmetConfig: (auth: Credentials) => Promise<SigmetConfig>;
1
+ import { Credentials } from '@opengeoweb/authentication';
2
+ import { AirmetFromBackend, SigmetFromBackend } from './types';
3
+ import { AirmetConfig, SigmetConfig } from './config-types';
4
+ export declare const getAirmetList: (auth: Credentials) => Promise<AirmetFromBackend[]>;
5
+ export declare const getSigmetList: (auth: Credentials) => Promise<SigmetFromBackend[]>;
6
+ export declare const getlocalProductConfig: <T extends SigmetConfig | AirmetConfig>(configUrl: string) => Promise<T>;
7
+ export declare const getAirmetConfig: (auth: Credentials) => Promise<AirmetConfig>;
8
+ export declare const getSigmetConfig: (auth: Credentials) => Promise<SigmetConfig>;
@@ -1,87 +1,87 @@
1
- import { MapPreset } from '@opengeoweb/store';
2
- export interface AllowedUnits {
3
- unit_type: string;
4
- allowed_units: string[];
5
- }
6
- export type FIRLocationGeoJson = GeoJSON.FeatureCollection<GeoJSON.Geometry, {
7
- selectionType?: string;
8
- }>;
9
- export interface LevelMinMaxType {
10
- FT?: number;
11
- FL?: number;
12
- M?: number;
13
- }
14
- export interface MovementMinMaxType {
15
- KT?: number;
16
- KMH?: number;
17
- }
18
- export interface CloudLevelMinMaxType {
19
- FT?: number;
20
- M?: number;
21
- }
22
- export interface SurfaceWindMinMaxType {
23
- KT?: number;
24
- MPS?: number;
25
- }
26
- export interface FIRArea {
27
- fir_name: string;
28
- fir_location: FIRLocationGeoJson;
29
- location_indicator_atsr: string;
30
- location_indicator_atsu: string;
31
- max_hours_of_validity: number;
32
- hours_before_validity: number;
33
- level_min?: LevelMinMaxType;
34
- level_max?: LevelMinMaxType;
35
- level_rounding_FL?: number;
36
- level_rounding_FT?: number;
37
- level_rounding_M?: number;
38
- movement_min?: MovementMinMaxType;
39
- movement_max?: MovementMinMaxType;
40
- movement_rounding_kt?: number;
41
- movement_rounding_kmh?: number;
42
- max_polygon_points?: number;
43
- units: AllowedUnits[];
44
- }
45
- export interface FIRConfigSigmet extends FIRArea {
46
- tc_max_hours_of_validity: number;
47
- tc_hours_before_validity: number;
48
- va_max_hours_of_validity: number;
49
- va_hours_before_validity: number;
50
- adjacent_firs: string[];
51
- area_preset: string;
52
- }
53
- export interface FIRConfigAirmet extends FIRArea {
54
- cloud_level_min?: CloudLevelMinMaxType;
55
- cloud_level_max?: CloudLevelMinMaxType;
56
- cloud_lower_level_min?: CloudLevelMinMaxType;
57
- cloud_lower_level_max?: CloudLevelMinMaxType;
58
- cloud_level_rounding_ft?: number;
59
- cloud_level_rounding_m_below?: number;
60
- cloud_level_rounding_m_above?: number;
61
- wind_direction_rounding?: number;
62
- wind_speed_max?: SurfaceWindMinMaxType;
63
- wind_speed_min?: SurfaceWindMinMaxType;
64
- visibility_max?: number;
65
- visibility_min?: number;
66
- visibility_rounding_below?: number;
67
- visibility_rounding_above?: number;
68
- }
69
- type SigmetFIRArea = Record<string, FIRConfigSigmet>;
70
- type AirmetFIRArea = Record<string, FIRConfigAirmet>;
71
- export type Firareas = SigmetFIRArea | AirmetFIRArea;
72
- export interface ProductConfig {
73
- location_indicator_mwo: string;
74
- active_firs: string[];
75
- valid_from_delay_minutes: number;
76
- default_validity_minutes: number;
77
- fir_areas: Firareas;
78
- mapPreset?: MapPreset;
79
- omit_change_va_and_rdoact_cloud?: boolean;
80
- }
81
- export interface SigmetConfig extends ProductConfig {
82
- fir_areas: SigmetFIRArea;
83
- }
84
- export interface AirmetConfig extends ProductConfig {
85
- fir_areas: AirmetFIRArea;
86
- }
87
- export {};
1
+ import { MapPreset } from '@opengeoweb/store';
2
+ export interface AllowedUnits {
3
+ unit_type: string;
4
+ allowed_units: string[];
5
+ }
6
+ export type FIRLocationGeoJson = GeoJSON.FeatureCollection<GeoJSON.Geometry, {
7
+ selectionType?: string;
8
+ }>;
9
+ export interface LevelMinMaxType {
10
+ FT?: number;
11
+ FL?: number;
12
+ M?: number;
13
+ }
14
+ export interface MovementMinMaxType {
15
+ KT?: number;
16
+ KMH?: number;
17
+ }
18
+ export interface CloudLevelMinMaxType {
19
+ FT?: number;
20
+ M?: number;
21
+ }
22
+ export interface SurfaceWindMinMaxType {
23
+ KT?: number;
24
+ MPS?: number;
25
+ }
26
+ export interface FIRArea {
27
+ fir_name: string;
28
+ fir_location: FIRLocationGeoJson;
29
+ location_indicator_atsr: string;
30
+ location_indicator_atsu: string;
31
+ max_hours_of_validity: number;
32
+ hours_before_validity: number;
33
+ level_min?: LevelMinMaxType;
34
+ level_max?: LevelMinMaxType;
35
+ level_rounding_FL?: number;
36
+ level_rounding_FT?: number;
37
+ level_rounding_M?: number;
38
+ movement_min?: MovementMinMaxType;
39
+ movement_max?: MovementMinMaxType;
40
+ movement_rounding_kt?: number;
41
+ movement_rounding_kmh?: number;
42
+ max_polygon_points?: number;
43
+ units: AllowedUnits[];
44
+ }
45
+ export interface FIRConfigSigmet extends FIRArea {
46
+ tc_max_hours_of_validity: number;
47
+ tc_hours_before_validity: number;
48
+ va_max_hours_of_validity: number;
49
+ va_hours_before_validity: number;
50
+ adjacent_firs: string[];
51
+ area_preset: string;
52
+ }
53
+ export interface FIRConfigAirmet extends FIRArea {
54
+ cloud_level_min?: CloudLevelMinMaxType;
55
+ cloud_level_max?: CloudLevelMinMaxType;
56
+ cloud_lower_level_min?: CloudLevelMinMaxType;
57
+ cloud_lower_level_max?: CloudLevelMinMaxType;
58
+ cloud_level_rounding_ft?: number;
59
+ cloud_level_rounding_m_below?: number;
60
+ cloud_level_rounding_m_above?: number;
61
+ wind_direction_rounding?: number;
62
+ wind_speed_max?: SurfaceWindMinMaxType;
63
+ wind_speed_min?: SurfaceWindMinMaxType;
64
+ visibility_max?: number;
65
+ visibility_min?: number;
66
+ visibility_rounding_below?: number;
67
+ visibility_rounding_above?: number;
68
+ }
69
+ type SigmetFIRArea = Record<string, FIRConfigSigmet>;
70
+ type AirmetFIRArea = Record<string, FIRConfigAirmet>;
71
+ export type Firareas = SigmetFIRArea | AirmetFIRArea;
72
+ export interface ProductConfig {
73
+ location_indicator_mwo: string;
74
+ active_firs: string[];
75
+ valid_from_delay_minutes: number;
76
+ default_validity_minutes: number;
77
+ fir_areas: Firareas;
78
+ mapPreset?: MapPreset;
79
+ omit_change_va_and_rdoact_cloud?: boolean;
80
+ }
81
+ export interface SigmetConfig extends ProductConfig {
82
+ fir_areas: SigmetFIRArea;
83
+ }
84
+ export interface AirmetConfig extends ProductConfig {
85
+ fir_areas: AirmetFIRArea;
86
+ }
87
+ export {};
@@ -1,141 +1,141 @@
1
- export type DateType = string;
2
- export type ICAOLocation = string;
3
- export type MWOLocation = string;
4
- export type ATSULocation = string;
5
- export type ATSRLocation = string;
6
- /**
7
- * ProductStatus is returned by the backend. The backend fills in this property.
8
- * For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
9
- * The backend should derive and return the status 'EXPIRED' from the product properties.
10
- *
11
- * Note: ProductStatus from the backend should be refreshed regularly to display status updates. */
12
- export declare enum ProductStatus {
13
- DRAFT = "DRAFT",
14
- PUBLISHED = "PUBLISHED",
15
- CANCELLED = "CANCELLED",
16
- EXPIRED = "EXPIRED",
17
- DISCARDED = "DISCARDED"
18
- }
19
- /**
20
- * ProductSequence is a sequence label with a counter of the SIGMETs/AIRMETs issued on a day (starting at with 1 01:00),
21
- * max 3 characters long; first character should be a capital letter,
22
- * others are numbers: A01-A99, 01-99 or 1-99 */
23
- export type ProductSequenceId = string;
24
- /**
25
- * ProductCanbe lifecycle is determined by the backend. E.g. the backend fills in these properties:
26
- * 'DRAFTED': product can be saved as draft
27
- * 'DISCARDED': This product can be thrown away
28
- * 'PUBLISHED': product can be PUBLISHED
29
- * 'CANCELLED': product can be CANCELLED */
30
- export type ProductCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED';
31
- export type ObservationOrForcast = 'OBS' | 'FCST';
32
- export declare enum LevelUnits {
33
- 'FT' = "ft",
34
- 'M' = "m",
35
- 'FL' = "FL"
36
- }
37
- export declare enum CloudLevelUnits {
38
- 'FT' = "ft",
39
- 'M' = "m"
40
- }
41
- /** Change type of the Product, can be:
42
- * INTSF:Intensifying
43
- * WKN: Weakening
44
- * NC: No change */
45
- export type Change = 'INTSF' | 'WKN' | 'NC';
46
- export type LevelInfoMode = 'AT' | 'BETW' | 'BETW_SFC' | 'TOPS' | 'TOPS_ABV' | 'TOPS_BLW' | 'ABV';
47
- /**
48
- * The possible phenomena for the sigmet
49
- */
50
- export declare enum SigmetPhenomena {
51
- 'EMBD_TS' = "Embedded thunderstorm(s)",
52
- 'EMBD_TSGR' = "Embedded thunderstorm(s) with hail",
53
- 'FRQ_TS' = "Frequent thunderstorm(s)",
54
- 'FRQ_TSGR' = "Frequent thunderstorm(s) with hail",
55
- 'HVY_DS' = "Heavy duststorm",
56
- 'HVY_SS' = "Heavy sandstorm",
57
- 'OBSC_TS' = "Obscured thunderstorm(s)",
58
- 'OBSC_TSGR' = "Obscured thunderstorm(s) with hail",
59
- 'RDOACT_CLD' = "Radioactive cloud",
60
- 'SEV_ICE' = "Severe icing",
61
- 'SEV_ICE_FRZ_RN' = "Severe icing due to freezing rain",
62
- 'SEV_MTW' = "Severe mountain wave",
63
- 'SEV_TURB' = "Severe turbulence",
64
- 'SQL_TS' = "Squall line",
65
- 'SQL_TSGR' = "Squall line thunderstorm(s) with hail",
66
- 'VA_CLD' = "Volcanic ash cloud"
67
- }
68
- /**
69
- * The possible phenomena for the airmet
70
- */
71
- export declare enum AirmetPhenomena {
72
- 'SFC_VIS' = "Surface visibility",
73
- 'SFC_WIND' = "Surface wind",
74
- 'OVC_CLD' = "Overcast cloud",
75
- 'BKN_CLD' = "Broken cloud",
76
- 'ISOL_CB' = "Isolated cumulonimbus cloud",
77
- 'OCNL_CB' = "Occasional cumulonimbus cloud",
78
- 'FRQ_CB' = "Frequent cumulonimbus cloud",
79
- 'ISOL_TS' = "Isolated thunderstorm(s)",
80
- 'OCNL_TS' = "Occasional thunderstorm(s)",
81
- 'ISOL_TSGR' = "Isolated thunderstorm(s) with hail",
82
- 'OCNL_TSGR' = "Occasional thunderstorm(s) with hail",
83
- 'ISOL_TCU' = "Isolated towering cumulus cloud",
84
- 'OCNL_TCU' = "Occasional towering cumulus cloud",
85
- 'FRQ_TCU' = "Frequent towering cumulus cloud",
86
- 'MOD_ICE' = "Moderate icing",
87
- 'MOD_MTW' = "Moderate mountain wave",
88
- 'MOD_TURB' = "Moderate turbulence",
89
- 'MT_OBSC' = "Mountains obscured"
90
- }
91
- export type SigmetMovementType = 'STATIONARY' | 'MOVEMENT' | 'FORECAST_POSITION' | 'NO_VA_EXP';
92
- export type AirmetMovementType = 'STATIONARY' | 'MOVEMENT';
93
- export declare enum MovementUnit {
94
- 'KT' = "kt",
95
- 'KMH' = "kmh"
96
- }
97
- export declare enum WindUnit {
98
- 'KT' = "kt",
99
- 'MPS' = "mps"
100
- }
101
- export declare enum Direction {
102
- 'N' = "N",
103
- 'NNE' = "NNE",
104
- 'NE' = "NE",
105
- 'ENE' = "ENE",
106
- 'E' = "E",
107
- 'ESE' = "ESE",
108
- 'SE' = "SE",
109
- 'SSE' = "SSE",
110
- 'S' = "S",
111
- 'SSW' = "SSW",
112
- 'SW' = "SW",
113
- 'WSW' = "WSW",
114
- 'W' = "W",
115
- 'WNW' = "WNW",
116
- 'NW' = "NW",
117
- 'NNW' = "NNW"
118
- }
119
- export type VisibilityUnit = 'm';
120
- export declare enum VisibilityCause {
121
- 'DZ' = "Drizzle",
122
- 'DU' = "Dust",
123
- 'PO' = "Dust or sand devil",
124
- 'DS' = "Dust storm",
125
- 'FG' = "Fog",
126
- 'FC' = "Funnel clouds",
127
- 'GR' = "Hail",
128
- 'HZ' = "Haze",
129
- 'PL' = "Ice pellets",
130
- 'BR' = "Mist",
131
- 'RA' = "Rain",
132
- 'SA' = "Sand",
133
- 'SS' = "Sand storm",
134
- 'FU' = "Smoke",
135
- 'SN' = "Snow",
136
- 'SG' = "Snow grains",
137
- 'GS' = "Soft hail",
138
- 'SQ' = "Squalls",
139
- 'VA' = "Volcanic Ash"
140
- }
141
- export type CloudLevelInfoMode = 'BETW' | 'BETW_SFC' | 'BETW_SFC_ABV' | 'BETW_ABV';
1
+ export type DateType = string;
2
+ export type ICAOLocation = string;
3
+ export type MWOLocation = string;
4
+ export type ATSULocation = string;
5
+ export type ATSRLocation = string;
6
+ /**
7
+ * ProductStatus is returned by the backend. The backend fills in this property.
8
+ * For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
9
+ * The backend should derive and return the status 'EXPIRED' from the product properties.
10
+ *
11
+ * Note: ProductStatus from the backend should be refreshed regularly to display status updates. */
12
+ export declare enum ProductStatus {
13
+ DRAFT = "DRAFT",
14
+ PUBLISHED = "PUBLISHED",
15
+ CANCELLED = "CANCELLED",
16
+ EXPIRED = "EXPIRED",
17
+ DISCARDED = "DISCARDED"
18
+ }
19
+ /**
20
+ * ProductSequence is a sequence label with a counter of the SIGMETs/AIRMETs issued on a day (starting at with 1 01:00),
21
+ * max 3 characters long; first character should be a capital letter,
22
+ * others are numbers: A01-A99, 01-99 or 1-99 */
23
+ export type ProductSequenceId = string;
24
+ /**
25
+ * ProductCanbe lifecycle is determined by the backend. E.g. the backend fills in these properties:
26
+ * 'DRAFTED': product can be saved as draft
27
+ * 'DISCARDED': This product can be thrown away
28
+ * 'PUBLISHED': product can be PUBLISHED
29
+ * 'CANCELLED': product can be CANCELLED */
30
+ export type ProductCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED';
31
+ export type ObservationOrForcast = 'OBS' | 'FCST';
32
+ export declare enum LevelUnits {
33
+ 'FT' = "ft",
34
+ 'M' = "m",
35
+ 'FL' = "FL"
36
+ }
37
+ export declare enum CloudLevelUnits {
38
+ 'FT' = "ft",
39
+ 'M' = "m"
40
+ }
41
+ /** Change type of the Product, can be:
42
+ * INTSF:Intensifying
43
+ * WKN: Weakening
44
+ * NC: No change */
45
+ export type Change = 'INTSF' | 'WKN' | 'NC';
46
+ export type LevelInfoMode = 'AT' | 'BETW' | 'BETW_SFC' | 'TOPS' | 'TOPS_ABV' | 'TOPS_BLW' | 'ABV';
47
+ /**
48
+ * The possible phenomena for the sigmet
49
+ */
50
+ export declare enum SigmetPhenomena {
51
+ 'EMBD_TS' = "Embedded thunderstorm(s)",
52
+ 'EMBD_TSGR' = "Embedded thunderstorm(s) with hail",
53
+ 'FRQ_TS' = "Frequent thunderstorm(s)",
54
+ 'FRQ_TSGR' = "Frequent thunderstorm(s) with hail",
55
+ 'HVY_DS' = "Heavy duststorm",
56
+ 'HVY_SS' = "Heavy sandstorm",
57
+ 'OBSC_TS' = "Obscured thunderstorm(s)",
58
+ 'OBSC_TSGR' = "Obscured thunderstorm(s) with hail",
59
+ 'RDOACT_CLD' = "Radioactive cloud",
60
+ 'SEV_ICE' = "Severe icing",
61
+ 'SEV_ICE_FRZ_RN' = "Severe icing due to freezing rain",
62
+ 'SEV_MTW' = "Severe mountain wave",
63
+ 'SEV_TURB' = "Severe turbulence",
64
+ 'SQL_TS' = "Squall line",
65
+ 'SQL_TSGR' = "Squall line thunderstorm(s) with hail",
66
+ 'VA_CLD' = "Volcanic ash cloud"
67
+ }
68
+ /**
69
+ * The possible phenomena for the airmet
70
+ */
71
+ export declare enum AirmetPhenomena {
72
+ 'SFC_VIS' = "Surface visibility",
73
+ 'SFC_WIND' = "Surface wind",
74
+ 'OVC_CLD' = "Overcast cloud",
75
+ 'BKN_CLD' = "Broken cloud",
76
+ 'ISOL_CB' = "Isolated cumulonimbus cloud",
77
+ 'OCNL_CB' = "Occasional cumulonimbus cloud",
78
+ 'FRQ_CB' = "Frequent cumulonimbus cloud",
79
+ 'ISOL_TS' = "Isolated thunderstorm(s)",
80
+ 'OCNL_TS' = "Occasional thunderstorm(s)",
81
+ 'ISOL_TSGR' = "Isolated thunderstorm(s) with hail",
82
+ 'OCNL_TSGR' = "Occasional thunderstorm(s) with hail",
83
+ 'ISOL_TCU' = "Isolated towering cumulus cloud",
84
+ 'OCNL_TCU' = "Occasional towering cumulus cloud",
85
+ 'FRQ_TCU' = "Frequent towering cumulus cloud",
86
+ 'MOD_ICE' = "Moderate icing",
87
+ 'MOD_MTW' = "Moderate mountain wave",
88
+ 'MOD_TURB' = "Moderate turbulence",
89
+ 'MT_OBSC' = "Mountains obscured"
90
+ }
91
+ export type SigmetMovementType = 'STATIONARY' | 'MOVEMENT' | 'FORECAST_POSITION' | 'NO_VA_EXP';
92
+ export type AirmetMovementType = 'STATIONARY' | 'MOVEMENT';
93
+ export declare enum MovementUnit {
94
+ 'KT' = "kt",
95
+ 'KMH' = "kmh"
96
+ }
97
+ export declare enum WindUnit {
98
+ 'KT' = "kt",
99
+ 'MPS' = "mps"
100
+ }
101
+ export declare enum Direction {
102
+ 'N' = "N",
103
+ 'NNE' = "NNE",
104
+ 'NE' = "NE",
105
+ 'ENE' = "ENE",
106
+ 'E' = "E",
107
+ 'ESE' = "ESE",
108
+ 'SE' = "SE",
109
+ 'SSE' = "SSE",
110
+ 'S' = "S",
111
+ 'SSW' = "SSW",
112
+ 'SW' = "SW",
113
+ 'WSW' = "WSW",
114
+ 'W' = "W",
115
+ 'WNW' = "WNW",
116
+ 'NW' = "NW",
117
+ 'NNW' = "NNW"
118
+ }
119
+ export type VisibilityUnit = 'm';
120
+ export declare enum VisibilityCause {
121
+ 'DZ' = "Drizzle",
122
+ 'DU' = "Dust",
123
+ 'PO' = "Dust or sand devil",
124
+ 'DS' = "Dust storm",
125
+ 'FG' = "Fog",
126
+ 'FC' = "Funnel clouds",
127
+ 'GR' = "Hail",
128
+ 'HZ' = "Haze",
129
+ 'PL' = "Ice pellets",
130
+ 'BR' = "Mist",
131
+ 'RA' = "Rain",
132
+ 'SA' = "Sand",
133
+ 'SS' = "Sand storm",
134
+ 'FU' = "Smoke",
135
+ 'SN' = "Snow",
136
+ 'SG' = "Snow grains",
137
+ 'GS' = "Soft hail",
138
+ 'SQ' = "Squalls",
139
+ 'VA' = "Volcanic Ash"
140
+ }
141
+ export type CloudLevelInfoMode = 'BETW' | 'BETW_SFC' | 'BETW_SFC_ABV' | 'BETW_ABV';
@@ -1,4 +1,4 @@
1
- import { UseQueryResult } from '@tanstack/react-query';
2
- import { AirmetFromBackend, SigmetFromBackend } from './types';
3
- export declare const useAirmetList: () => UseQueryResult<AirmetFromBackend[]>;
4
- export declare const useSigmetList: () => UseQueryResult<SigmetFromBackend[]>;
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ import { AirmetFromBackend, SigmetFromBackend } from './types';
3
+ export declare const useAirmetList: () => UseQueryResult<AirmetFromBackend[]>;
4
+ export declare const useSigmetList: () => UseQueryResult<SigmetFromBackend[]>;
@@ -1,98 +1,98 @@
1
- import { AirmetMovementType, AirmetPhenomena, ATSRLocation, ATSULocation, Change, CloudLevelInfoMode, CloudLevelUnits, DateType, Direction, ICAOLocation, LevelInfoMode, LevelUnits, MovementUnit, MWOLocation, ObservationOrForcast, ProductCanbe, ProductSequenceId, ProductStatus, SigmetMovementType, SigmetPhenomena, VisibilityCause, VisibilityUnit, WindUnit } from './definitions';
2
- export interface LevelType {
3
- value: number;
4
- unit: LevelUnits;
5
- }
6
- export interface CloudLevelType {
7
- value: number;
8
- unit: CloudLevelUnits;
9
- }
10
- export interface Coordinate {
11
- latitude: number;
12
- longitude: number;
13
- }
14
- export interface BaseProduct {
15
- validDateStart: DateType;
16
- validDateEnd: DateType;
17
- firName: ICAOLocation;
18
- locationIndicatorMWO: MWOLocation;
19
- locationIndicatorATSU: ATSULocation;
20
- locationIndicatorATSR: ATSRLocation;
21
- uuid?: string;
22
- sequence?: ProductSequenceId;
23
- issueDate?: DateType;
24
- }
25
- interface Product extends BaseProduct {
26
- status: ProductStatus;
27
- isObservationOrForecast?: ObservationOrForcast;
28
- observationOrForecastTime?: DateType;
29
- change?: Change;
30
- levelInfoMode?: LevelInfoMode;
31
- level?: LevelType;
32
- lowerLevel?: LevelType;
33
- firGeometry?: GeoJSON.FeatureCollection;
34
- startGeometry: GeoJSON.FeatureCollection;
35
- startGeometryIntersect: GeoJSON.FeatureCollection;
36
- movementSpeed?: number;
37
- movementUnit?: MovementUnit;
38
- movementDirection?: Direction;
39
- }
40
- export interface Sigmet extends Product {
41
- phenomenon: SigmetPhenomena;
42
- type: 'NORMAL' | 'TEST' | 'EXERCISE' | 'SHORT_TEST' | 'SHORT_VA_TEST';
43
- endGeometry?: GeoJSON.FeatureCollection;
44
- endGeometryIntersect?: GeoJSON.FeatureCollection;
45
- movementType?: SigmetMovementType;
46
- /** Extra properties in case of va SIGMET */
47
- vaSigmetVolcanoName?: string;
48
- vaSigmetVolcanoCoordinates?: Coordinate;
49
- /** Extra properties in case of cancel va SIGMET, if set to unknown, property not set */
50
- vaSigmetMoveToFIR?: ICAOLocation;
51
- }
52
- /**
53
- * To cancel a published sigmet
54
- * To cancel a published sigmet, we send a cancel sigmet with all the mandatory properties from the basesigmet. */
55
- export interface CancelSigmet extends BaseProduct {
56
- cancelsSigmetSequenceId: ProductSequenceId;
57
- validDateStartOfSigmetToCancel: DateType;
58
- validDateEndOfSigmetToCancel: DateType;
59
- status: ProductStatus.PUBLISHED;
60
- /** Extra properties in case of cancel va SIGMET, if set to unknown, property not set */
61
- vaSigmetMoveToFIR?: ICAOLocation;
62
- }
63
- export interface Airmet extends Product {
64
- phenomenon: AirmetPhenomena;
65
- status: ProductStatus;
66
- type: 'NORMAL' | 'TEST' | 'EXERCISE';
67
- movementType: AirmetMovementType;
68
- windSpeed?: number;
69
- windUnit?: WindUnit;
70
- windDirection?: number;
71
- visibilityValue?: number;
72
- visibilityCause?: VisibilityCause;
73
- visibilityUnit?: VisibilityUnit;
74
- cloudLevelInfoMode?: CloudLevelInfoMode;
75
- cloudLevel?: CloudLevelType;
76
- cloudLowerLevel?: CloudLevelType;
77
- }
78
- export interface CancelAirmet extends BaseProduct {
79
- cancelsAirmetSequenceId: ProductSequenceId;
80
- validDateStartOfAirmetToCancel: DateType;
81
- validDateEndOfAirmetToCancel: DateType;
82
- status: ProductStatus.PUBLISHED;
83
- }
84
- export interface SigmetFromBackend {
85
- sigmet: Sigmet | CancelSigmet;
86
- creationDate: DateType;
87
- lastUpdateDate: DateType;
88
- uuid: string;
89
- canbe: ProductCanbe[];
90
- }
91
- export interface AirmetFromBackend {
92
- airmet: Airmet | CancelAirmet;
93
- creationDate: DateType;
94
- lastUpdateDate: DateType;
95
- uuid: string;
96
- canbe: ProductCanbe[];
97
- }
98
- export {};
1
+ import { AirmetMovementType, AirmetPhenomena, ATSRLocation, ATSULocation, Change, CloudLevelInfoMode, CloudLevelUnits, DateType, Direction, ICAOLocation, LevelInfoMode, LevelUnits, MovementUnit, MWOLocation, ObservationOrForcast, ProductCanbe, ProductSequenceId, ProductStatus, SigmetMovementType, SigmetPhenomena, VisibilityCause, VisibilityUnit, WindUnit } from './definitions';
2
+ export interface LevelType {
3
+ value: number;
4
+ unit: LevelUnits;
5
+ }
6
+ export interface CloudLevelType {
7
+ value: number;
8
+ unit: CloudLevelUnits;
9
+ }
10
+ export interface Coordinate {
11
+ latitude: number;
12
+ longitude: number;
13
+ }
14
+ export interface BaseProduct {
15
+ validDateStart: DateType;
16
+ validDateEnd: DateType;
17
+ firName: ICAOLocation;
18
+ locationIndicatorMWO: MWOLocation;
19
+ locationIndicatorATSU: ATSULocation;
20
+ locationIndicatorATSR: ATSRLocation;
21
+ uuid?: string;
22
+ sequence?: ProductSequenceId;
23
+ issueDate?: DateType;
24
+ }
25
+ interface Product extends BaseProduct {
26
+ status: ProductStatus;
27
+ isObservationOrForecast?: ObservationOrForcast;
28
+ observationOrForecastTime?: DateType;
29
+ change?: Change;
30
+ levelInfoMode?: LevelInfoMode;
31
+ level?: LevelType;
32
+ lowerLevel?: LevelType;
33
+ firGeometry?: GeoJSON.FeatureCollection;
34
+ startGeometry: GeoJSON.FeatureCollection;
35
+ startGeometryIntersect: GeoJSON.FeatureCollection;
36
+ movementSpeed?: number;
37
+ movementUnit?: MovementUnit;
38
+ movementDirection?: Direction;
39
+ }
40
+ export interface Sigmet extends Product {
41
+ phenomenon: SigmetPhenomena;
42
+ type: 'NORMAL' | 'TEST' | 'EXERCISE' | 'SHORT_TEST' | 'SHORT_VA_TEST';
43
+ endGeometry?: GeoJSON.FeatureCollection;
44
+ endGeometryIntersect?: GeoJSON.FeatureCollection;
45
+ movementType?: SigmetMovementType;
46
+ /** Extra properties in case of va SIGMET */
47
+ vaSigmetVolcanoName?: string;
48
+ vaSigmetVolcanoCoordinates?: Coordinate;
49
+ /** Extra properties in case of cancel va SIGMET, if set to unknown, property not set */
50
+ vaSigmetMoveToFIR?: ICAOLocation;
51
+ }
52
+ /**
53
+ * To cancel a published sigmet
54
+ * To cancel a published sigmet, we send a cancel sigmet with all the mandatory properties from the basesigmet. */
55
+ export interface CancelSigmet extends BaseProduct {
56
+ cancelsSigmetSequenceId: ProductSequenceId;
57
+ validDateStartOfSigmetToCancel: DateType;
58
+ validDateEndOfSigmetToCancel: DateType;
59
+ status: ProductStatus.PUBLISHED;
60
+ /** Extra properties in case of cancel va SIGMET, if set to unknown, property not set */
61
+ vaSigmetMoveToFIR?: ICAOLocation;
62
+ }
63
+ export interface Airmet extends Product {
64
+ phenomenon: AirmetPhenomena;
65
+ status: ProductStatus;
66
+ type: 'NORMAL' | 'TEST' | 'EXERCISE';
67
+ movementType: AirmetMovementType;
68
+ windSpeed?: number;
69
+ windUnit?: WindUnit;
70
+ windDirection?: number;
71
+ visibilityValue?: number;
72
+ visibilityCause?: VisibilityCause;
73
+ visibilityUnit?: VisibilityUnit;
74
+ cloudLevelInfoMode?: CloudLevelInfoMode;
75
+ cloudLevel?: CloudLevelType;
76
+ cloudLowerLevel?: CloudLevelType;
77
+ }
78
+ export interface CancelAirmet extends BaseProduct {
79
+ cancelsAirmetSequenceId: ProductSequenceId;
80
+ validDateStartOfAirmetToCancel: DateType;
81
+ validDateEndOfAirmetToCancel: DateType;
82
+ status: ProductStatus.PUBLISHED;
83
+ }
84
+ export interface SigmetFromBackend {
85
+ sigmet: Sigmet | CancelSigmet;
86
+ creationDate: DateType;
87
+ lastUpdateDate: DateType;
88
+ uuid: string;
89
+ canbe: ProductCanbe[];
90
+ }
91
+ export interface AirmetFromBackend {
92
+ airmet: Airmet | CancelAirmet;
93
+ creationDate: DateType;
94
+ lastUpdateDate: DateType;
95
+ uuid: string;
96
+ canbe: ProductCanbe[];
97
+ }
98
+ export {};
package/src/utils.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Credentials } from '@opengeoweb/authentication';
2
- export declare const getHeaders: (auth: Credentials) => HeadersInit;
1
+ import { Credentials } from '@opengeoweb/authentication';
2
+ export declare const getHeaders: (auth: Credentials) => HeadersInit;