open-meteo-mcp-server 1.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/LICENSE +21 -0
- package/README.md +317 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +141 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +255 -0
- package/dist/index.js.map +1 -0
- package/dist/tools.d.ts +13 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +644 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +256 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +137 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CoordinateSchema: z.ZodObject<{
|
|
3
|
+
latitude: z.ZodNumber;
|
|
4
|
+
longitude: z.ZodNumber;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
latitude: number;
|
|
7
|
+
longitude: number;
|
|
8
|
+
}, {
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const TemperatureUnitSchema: z.ZodDefault<z.ZodEnum<["celsius", "fahrenheit"]>>;
|
|
13
|
+
export declare const WindSpeedUnitSchema: z.ZodDefault<z.ZodEnum<["kmh", "ms", "mph", "kn"]>>;
|
|
14
|
+
export declare const PrecipitationUnitSchema: z.ZodDefault<z.ZodEnum<["mm", "inch"]>>;
|
|
15
|
+
export declare const TimeFormatSchema: z.ZodDefault<z.ZodEnum<["iso8601", "unixtime"]>>;
|
|
16
|
+
export declare const HourlyVariablesSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m", "relative_humidity_2m", "dewpoint_2m", "apparent_temperature", "surface_temperature", "pressure_msl", "surface_pressure", "cloud_cover", "cloud_cover_low", "cloud_cover_mid", "cloud_cover_high", "wind_speed_10m", "wind_speed_80m", "wind_speed_120m", "wind_speed_180m", "wind_direction_10m", "wind_direction_80m", "wind_direction_120m", "wind_direction_180m", "wind_gusts_10m", "wind_u_component_10m", "wind_v_component_10m", "wind_u_component_80m", "wind_v_component_80m", "wind_u_component_120m", "wind_v_component_120m", "wind_u_component_180m", "wind_v_component_180m", "shortwave_radiation", "direct_radiation", "direct_normal_irradiance", "diffuse_radiation", "terrestrial_radiation", "sunshine_duration", "uv_index", "uv_index_clear_sky", "precipitation", "rain", "showers", "snowfall", "precipitation_probability", "snow_depth", "snow_height", "vapour_pressure_deficit", "et0_fao_evapotranspiration", "weather_code", "visibility", "is_day", "cape", "lifted_index", "convective_inhibition", "freezing_level_height", "boundary_layer_height", "updraft_velocity", "downdraft_velocity", "soil_temperature_0cm", "soil_temperature_6cm", "soil_temperature_18cm", "soil_temperature_54cm", "soil_moisture_0_1cm", "soil_moisture_1_3cm", "soil_moisture_3_9cm", "soil_moisture_9_27cm", "soil_moisture_27_81cm", "sensible_heat_flux", "latent_heat_flux", "growing_degree_days_base_0_limit_30", "leaf_wetness_probability", "skin_temperature"]>, "many">>;
|
|
17
|
+
export declare const DailyVariablesSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m_max", "temperature_2m_min", "apparent_temperature_max", "apparent_temperature_min", "precipitation_sum", "precipitation_hours", "weather_code", "sunrise", "sunset", "wind_speed_10m_max", "wind_gusts_10m_max", "wind_direction_10m_dominant", "shortwave_radiation_sum", "uv_index_max", "uv_index_clear_sky_max", "et0_fao_evapotranspiration"]>, "many">>;
|
|
18
|
+
export declare const WeatherModelsSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["meteofrance_arome_france_hd", "meteofrance_arome_france", "meteofrance_arpege_europe", "icon_eu", "icon_global", "ecmwf_ifs025", "gfs013"]>, "many">>;
|
|
19
|
+
export declare const ForecastParamsSchema: z.ZodObject<{
|
|
20
|
+
latitude: z.ZodNumber;
|
|
21
|
+
longitude: z.ZodNumber;
|
|
22
|
+
} & {
|
|
23
|
+
hourly: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m", "relative_humidity_2m", "dewpoint_2m", "apparent_temperature", "surface_temperature", "pressure_msl", "surface_pressure", "cloud_cover", "cloud_cover_low", "cloud_cover_mid", "cloud_cover_high", "wind_speed_10m", "wind_speed_80m", "wind_speed_120m", "wind_speed_180m", "wind_direction_10m", "wind_direction_80m", "wind_direction_120m", "wind_direction_180m", "wind_gusts_10m", "wind_u_component_10m", "wind_v_component_10m", "wind_u_component_80m", "wind_v_component_80m", "wind_u_component_120m", "wind_v_component_120m", "wind_u_component_180m", "wind_v_component_180m", "shortwave_radiation", "direct_radiation", "direct_normal_irradiance", "diffuse_radiation", "terrestrial_radiation", "sunshine_duration", "uv_index", "uv_index_clear_sky", "precipitation", "rain", "showers", "snowfall", "precipitation_probability", "snow_depth", "snow_height", "vapour_pressure_deficit", "et0_fao_evapotranspiration", "weather_code", "visibility", "is_day", "cape", "lifted_index", "convective_inhibition", "freezing_level_height", "boundary_layer_height", "updraft_velocity", "downdraft_velocity", "soil_temperature_0cm", "soil_temperature_6cm", "soil_temperature_18cm", "soil_temperature_54cm", "soil_moisture_0_1cm", "soil_moisture_1_3cm", "soil_moisture_3_9cm", "soil_moisture_9_27cm", "soil_moisture_27_81cm", "sensible_heat_flux", "latent_heat_flux", "growing_degree_days_base_0_limit_30", "leaf_wetness_probability", "skin_temperature"]>, "many">>;
|
|
24
|
+
daily: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m_max", "temperature_2m_min", "apparent_temperature_max", "apparent_temperature_min", "precipitation_sum", "precipitation_hours", "weather_code", "sunrise", "sunset", "wind_speed_10m_max", "wind_gusts_10m_max", "wind_direction_10m_dominant", "shortwave_radiation_sum", "uv_index_max", "uv_index_clear_sky_max", "et0_fao_evapotranspiration"]>, "many">>;
|
|
25
|
+
current_weather: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
temperature_unit: z.ZodDefault<z.ZodEnum<["celsius", "fahrenheit"]>>;
|
|
27
|
+
wind_speed_unit: z.ZodDefault<z.ZodEnum<["kmh", "ms", "mph", "kn"]>>;
|
|
28
|
+
precipitation_unit: z.ZodDefault<z.ZodEnum<["mm", "inch"]>>;
|
|
29
|
+
timeformat: z.ZodDefault<z.ZodEnum<["iso8601", "unixtime"]>>;
|
|
30
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
31
|
+
past_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
32
|
+
start_date: z.ZodOptional<z.ZodString>;
|
|
33
|
+
end_date: z.ZodOptional<z.ZodString>;
|
|
34
|
+
start_hour: z.ZodOptional<z.ZodString>;
|
|
35
|
+
end_hour: z.ZodOptional<z.ZodString>;
|
|
36
|
+
models: z.ZodOptional<z.ZodArray<z.ZodEnum<["meteofrance_arome_france_hd", "meteofrance_arome_france", "meteofrance_arpege_europe", "icon_eu", "icon_global", "ecmwf_ifs025", "gfs013"]>, "many">>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
latitude: number;
|
|
39
|
+
longitude: number;
|
|
40
|
+
temperature_unit: "celsius" | "fahrenheit";
|
|
41
|
+
wind_speed_unit: "kmh" | "ms" | "mph" | "kn";
|
|
42
|
+
precipitation_unit: "mm" | "inch";
|
|
43
|
+
timeformat: "iso8601" | "unixtime";
|
|
44
|
+
hourly?: ("temperature_2m" | "relative_humidity_2m" | "dewpoint_2m" | "apparent_temperature" | "surface_temperature" | "pressure_msl" | "surface_pressure" | "cloud_cover" | "cloud_cover_low" | "cloud_cover_mid" | "cloud_cover_high" | "wind_speed_10m" | "wind_speed_80m" | "wind_speed_120m" | "wind_speed_180m" | "wind_direction_10m" | "wind_direction_80m" | "wind_direction_120m" | "wind_direction_180m" | "wind_gusts_10m" | "wind_u_component_10m" | "wind_v_component_10m" | "wind_u_component_80m" | "wind_v_component_80m" | "wind_u_component_120m" | "wind_v_component_120m" | "wind_u_component_180m" | "wind_v_component_180m" | "shortwave_radiation" | "direct_radiation" | "direct_normal_irradiance" | "diffuse_radiation" | "terrestrial_radiation" | "sunshine_duration" | "uv_index" | "uv_index_clear_sky" | "precipitation" | "rain" | "showers" | "snowfall" | "precipitation_probability" | "snow_depth" | "snow_height" | "vapour_pressure_deficit" | "et0_fao_evapotranspiration" | "weather_code" | "visibility" | "is_day" | "cape" | "lifted_index" | "convective_inhibition" | "freezing_level_height" | "boundary_layer_height" | "updraft_velocity" | "downdraft_velocity" | "soil_temperature_0cm" | "soil_temperature_6cm" | "soil_temperature_18cm" | "soil_temperature_54cm" | "soil_moisture_0_1cm" | "soil_moisture_1_3cm" | "soil_moisture_3_9cm" | "soil_moisture_9_27cm" | "soil_moisture_27_81cm" | "sensible_heat_flux" | "latent_heat_flux" | "growing_degree_days_base_0_limit_30" | "leaf_wetness_probability" | "skin_temperature")[] | undefined;
|
|
45
|
+
daily?: ("et0_fao_evapotranspiration" | "weather_code" | "temperature_2m_max" | "temperature_2m_min" | "apparent_temperature_max" | "apparent_temperature_min" | "precipitation_sum" | "precipitation_hours" | "sunrise" | "sunset" | "wind_speed_10m_max" | "wind_gusts_10m_max" | "wind_direction_10m_dominant" | "shortwave_radiation_sum" | "uv_index_max" | "uv_index_clear_sky_max")[] | undefined;
|
|
46
|
+
current_weather?: boolean | undefined;
|
|
47
|
+
timezone?: string | undefined;
|
|
48
|
+
past_days?: 1 | 2 | undefined;
|
|
49
|
+
start_date?: string | undefined;
|
|
50
|
+
end_date?: string | undefined;
|
|
51
|
+
start_hour?: string | undefined;
|
|
52
|
+
end_hour?: string | undefined;
|
|
53
|
+
models?: ("meteofrance_arome_france_hd" | "meteofrance_arome_france" | "meteofrance_arpege_europe" | "icon_eu" | "icon_global" | "ecmwf_ifs025" | "gfs013")[] | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
latitude: number;
|
|
56
|
+
longitude: number;
|
|
57
|
+
hourly?: ("temperature_2m" | "relative_humidity_2m" | "dewpoint_2m" | "apparent_temperature" | "surface_temperature" | "pressure_msl" | "surface_pressure" | "cloud_cover" | "cloud_cover_low" | "cloud_cover_mid" | "cloud_cover_high" | "wind_speed_10m" | "wind_speed_80m" | "wind_speed_120m" | "wind_speed_180m" | "wind_direction_10m" | "wind_direction_80m" | "wind_direction_120m" | "wind_direction_180m" | "wind_gusts_10m" | "wind_u_component_10m" | "wind_v_component_10m" | "wind_u_component_80m" | "wind_v_component_80m" | "wind_u_component_120m" | "wind_v_component_120m" | "wind_u_component_180m" | "wind_v_component_180m" | "shortwave_radiation" | "direct_radiation" | "direct_normal_irradiance" | "diffuse_radiation" | "terrestrial_radiation" | "sunshine_duration" | "uv_index" | "uv_index_clear_sky" | "precipitation" | "rain" | "showers" | "snowfall" | "precipitation_probability" | "snow_depth" | "snow_height" | "vapour_pressure_deficit" | "et0_fao_evapotranspiration" | "weather_code" | "visibility" | "is_day" | "cape" | "lifted_index" | "convective_inhibition" | "freezing_level_height" | "boundary_layer_height" | "updraft_velocity" | "downdraft_velocity" | "soil_temperature_0cm" | "soil_temperature_6cm" | "soil_temperature_18cm" | "soil_temperature_54cm" | "soil_moisture_0_1cm" | "soil_moisture_1_3cm" | "soil_moisture_3_9cm" | "soil_moisture_9_27cm" | "soil_moisture_27_81cm" | "sensible_heat_flux" | "latent_heat_flux" | "growing_degree_days_base_0_limit_30" | "leaf_wetness_probability" | "skin_temperature")[] | undefined;
|
|
58
|
+
daily?: ("et0_fao_evapotranspiration" | "weather_code" | "temperature_2m_max" | "temperature_2m_min" | "apparent_temperature_max" | "apparent_temperature_min" | "precipitation_sum" | "precipitation_hours" | "sunrise" | "sunset" | "wind_speed_10m_max" | "wind_gusts_10m_max" | "wind_direction_10m_dominant" | "shortwave_radiation_sum" | "uv_index_max" | "uv_index_clear_sky_max")[] | undefined;
|
|
59
|
+
current_weather?: boolean | undefined;
|
|
60
|
+
temperature_unit?: "celsius" | "fahrenheit" | undefined;
|
|
61
|
+
wind_speed_unit?: "kmh" | "ms" | "mph" | "kn" | undefined;
|
|
62
|
+
precipitation_unit?: "mm" | "inch" | undefined;
|
|
63
|
+
timeformat?: "iso8601" | "unixtime" | undefined;
|
|
64
|
+
timezone?: string | undefined;
|
|
65
|
+
past_days?: 1 | 2 | undefined;
|
|
66
|
+
start_date?: string | undefined;
|
|
67
|
+
end_date?: string | undefined;
|
|
68
|
+
start_hour?: string | undefined;
|
|
69
|
+
end_hour?: string | undefined;
|
|
70
|
+
models?: ("meteofrance_arome_france_hd" | "meteofrance_arome_france" | "meteofrance_arpege_europe" | "icon_eu" | "icon_global" | "ecmwf_ifs025" | "gfs013")[] | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
export declare const ArchiveParamsSchema: z.ZodObject<{
|
|
73
|
+
latitude: z.ZodNumber;
|
|
74
|
+
longitude: z.ZodNumber;
|
|
75
|
+
} & {
|
|
76
|
+
hourly: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m", "relative_humidity_2m", "dewpoint_2m", "apparent_temperature", "surface_temperature", "pressure_msl", "surface_pressure", "cloud_cover", "cloud_cover_low", "cloud_cover_mid", "cloud_cover_high", "wind_speed_10m", "wind_speed_80m", "wind_speed_120m", "wind_speed_180m", "wind_direction_10m", "wind_direction_80m", "wind_direction_120m", "wind_direction_180m", "wind_gusts_10m", "wind_u_component_10m", "wind_v_component_10m", "wind_u_component_80m", "wind_v_component_80m", "wind_u_component_120m", "wind_v_component_120m", "wind_u_component_180m", "wind_v_component_180m", "shortwave_radiation", "direct_radiation", "direct_normal_irradiance", "diffuse_radiation", "terrestrial_radiation", "sunshine_duration", "uv_index", "uv_index_clear_sky", "precipitation", "rain", "showers", "snowfall", "precipitation_probability", "snow_depth", "snow_height", "vapour_pressure_deficit", "et0_fao_evapotranspiration", "weather_code", "visibility", "is_day", "cape", "lifted_index", "convective_inhibition", "freezing_level_height", "boundary_layer_height", "updraft_velocity", "downdraft_velocity", "soil_temperature_0cm", "soil_temperature_6cm", "soil_temperature_18cm", "soil_temperature_54cm", "soil_moisture_0_1cm", "soil_moisture_1_3cm", "soil_moisture_3_9cm", "soil_moisture_9_27cm", "soil_moisture_27_81cm", "sensible_heat_flux", "latent_heat_flux", "growing_degree_days_base_0_limit_30", "leaf_wetness_probability", "skin_temperature"]>, "many">>;
|
|
77
|
+
daily: z.ZodOptional<z.ZodArray<z.ZodEnum<["temperature_2m_max", "temperature_2m_min", "apparent_temperature_max", "apparent_temperature_min", "precipitation_sum", "precipitation_hours", "weather_code", "sunrise", "sunset", "wind_speed_10m_max", "wind_gusts_10m_max", "wind_direction_10m_dominant", "shortwave_radiation_sum", "uv_index_max", "uv_index_clear_sky_max", "et0_fao_evapotranspiration"]>, "many">>;
|
|
78
|
+
start_date: z.ZodString;
|
|
79
|
+
end_date: z.ZodString;
|
|
80
|
+
temperature_unit: z.ZodDefault<z.ZodEnum<["celsius", "fahrenheit"]>>;
|
|
81
|
+
wind_speed_unit: z.ZodDefault<z.ZodEnum<["kmh", "ms", "mph", "kn"]>>;
|
|
82
|
+
precipitation_unit: z.ZodDefault<z.ZodEnum<["mm", "inch"]>>;
|
|
83
|
+
timeformat: z.ZodDefault<z.ZodEnum<["iso8601", "unixtime"]>>;
|
|
84
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
latitude: number;
|
|
87
|
+
longitude: number;
|
|
88
|
+
temperature_unit: "celsius" | "fahrenheit";
|
|
89
|
+
wind_speed_unit: "kmh" | "ms" | "mph" | "kn";
|
|
90
|
+
precipitation_unit: "mm" | "inch";
|
|
91
|
+
timeformat: "iso8601" | "unixtime";
|
|
92
|
+
start_date: string;
|
|
93
|
+
end_date: string;
|
|
94
|
+
hourly?: ("temperature_2m" | "relative_humidity_2m" | "dewpoint_2m" | "apparent_temperature" | "surface_temperature" | "pressure_msl" | "surface_pressure" | "cloud_cover" | "cloud_cover_low" | "cloud_cover_mid" | "cloud_cover_high" | "wind_speed_10m" | "wind_speed_80m" | "wind_speed_120m" | "wind_speed_180m" | "wind_direction_10m" | "wind_direction_80m" | "wind_direction_120m" | "wind_direction_180m" | "wind_gusts_10m" | "wind_u_component_10m" | "wind_v_component_10m" | "wind_u_component_80m" | "wind_v_component_80m" | "wind_u_component_120m" | "wind_v_component_120m" | "wind_u_component_180m" | "wind_v_component_180m" | "shortwave_radiation" | "direct_radiation" | "direct_normal_irradiance" | "diffuse_radiation" | "terrestrial_radiation" | "sunshine_duration" | "uv_index" | "uv_index_clear_sky" | "precipitation" | "rain" | "showers" | "snowfall" | "precipitation_probability" | "snow_depth" | "snow_height" | "vapour_pressure_deficit" | "et0_fao_evapotranspiration" | "weather_code" | "visibility" | "is_day" | "cape" | "lifted_index" | "convective_inhibition" | "freezing_level_height" | "boundary_layer_height" | "updraft_velocity" | "downdraft_velocity" | "soil_temperature_0cm" | "soil_temperature_6cm" | "soil_temperature_18cm" | "soil_temperature_54cm" | "soil_moisture_0_1cm" | "soil_moisture_1_3cm" | "soil_moisture_3_9cm" | "soil_moisture_9_27cm" | "soil_moisture_27_81cm" | "sensible_heat_flux" | "latent_heat_flux" | "growing_degree_days_base_0_limit_30" | "leaf_wetness_probability" | "skin_temperature")[] | undefined;
|
|
95
|
+
daily?: ("et0_fao_evapotranspiration" | "weather_code" | "temperature_2m_max" | "temperature_2m_min" | "apparent_temperature_max" | "apparent_temperature_min" | "precipitation_sum" | "precipitation_hours" | "sunrise" | "sunset" | "wind_speed_10m_max" | "wind_gusts_10m_max" | "wind_direction_10m_dominant" | "shortwave_radiation_sum" | "uv_index_max" | "uv_index_clear_sky_max")[] | undefined;
|
|
96
|
+
timezone?: string | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
latitude: number;
|
|
99
|
+
longitude: number;
|
|
100
|
+
start_date: string;
|
|
101
|
+
end_date: string;
|
|
102
|
+
hourly?: ("temperature_2m" | "relative_humidity_2m" | "dewpoint_2m" | "apparent_temperature" | "surface_temperature" | "pressure_msl" | "surface_pressure" | "cloud_cover" | "cloud_cover_low" | "cloud_cover_mid" | "cloud_cover_high" | "wind_speed_10m" | "wind_speed_80m" | "wind_speed_120m" | "wind_speed_180m" | "wind_direction_10m" | "wind_direction_80m" | "wind_direction_120m" | "wind_direction_180m" | "wind_gusts_10m" | "wind_u_component_10m" | "wind_v_component_10m" | "wind_u_component_80m" | "wind_v_component_80m" | "wind_u_component_120m" | "wind_v_component_120m" | "wind_u_component_180m" | "wind_v_component_180m" | "shortwave_radiation" | "direct_radiation" | "direct_normal_irradiance" | "diffuse_radiation" | "terrestrial_radiation" | "sunshine_duration" | "uv_index" | "uv_index_clear_sky" | "precipitation" | "rain" | "showers" | "snowfall" | "precipitation_probability" | "snow_depth" | "snow_height" | "vapour_pressure_deficit" | "et0_fao_evapotranspiration" | "weather_code" | "visibility" | "is_day" | "cape" | "lifted_index" | "convective_inhibition" | "freezing_level_height" | "boundary_layer_height" | "updraft_velocity" | "downdraft_velocity" | "soil_temperature_0cm" | "soil_temperature_6cm" | "soil_temperature_18cm" | "soil_temperature_54cm" | "soil_moisture_0_1cm" | "soil_moisture_1_3cm" | "soil_moisture_3_9cm" | "soil_moisture_9_27cm" | "soil_moisture_27_81cm" | "sensible_heat_flux" | "latent_heat_flux" | "growing_degree_days_base_0_limit_30" | "leaf_wetness_probability" | "skin_temperature")[] | undefined;
|
|
103
|
+
daily?: ("et0_fao_evapotranspiration" | "weather_code" | "temperature_2m_max" | "temperature_2m_min" | "apparent_temperature_max" | "apparent_temperature_min" | "precipitation_sum" | "precipitation_hours" | "sunrise" | "sunset" | "wind_speed_10m_max" | "wind_gusts_10m_max" | "wind_direction_10m_dominant" | "shortwave_radiation_sum" | "uv_index_max" | "uv_index_clear_sky_max")[] | undefined;
|
|
104
|
+
temperature_unit?: "celsius" | "fahrenheit" | undefined;
|
|
105
|
+
wind_speed_unit?: "kmh" | "ms" | "mph" | "kn" | undefined;
|
|
106
|
+
precipitation_unit?: "mm" | "inch" | undefined;
|
|
107
|
+
timeformat?: "iso8601" | "unixtime" | undefined;
|
|
108
|
+
timezone?: string | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
export declare const AirQualityVariablesSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["pm10", "pm2_5", "carbon_monoxide", "nitrogen_dioxide", "ozone", "sulphur_dioxide", "ammonia", "dust", "aerosol_optical_depth", "carbon_dioxide", "methane"]>, "many">>;
|
|
111
|
+
export declare const AirQualityParamsSchema: z.ZodObject<{
|
|
112
|
+
latitude: z.ZodNumber;
|
|
113
|
+
longitude: z.ZodNumber;
|
|
114
|
+
} & {
|
|
115
|
+
hourly: z.ZodOptional<z.ZodArray<z.ZodEnum<["pm10", "pm2_5", "carbon_monoxide", "nitrogen_dioxide", "ozone", "sulphur_dioxide", "ammonia", "dust", "aerosol_optical_depth", "carbon_dioxide", "methane"]>, "many">>;
|
|
116
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
117
|
+
timeformat: z.ZodDefault<z.ZodEnum<["iso8601", "unixtime"]>>;
|
|
118
|
+
past_days: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
forecast_days: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
latitude: number;
|
|
122
|
+
longitude: number;
|
|
123
|
+
timeformat: "iso8601" | "unixtime";
|
|
124
|
+
hourly?: ("pm10" | "pm2_5" | "carbon_monoxide" | "nitrogen_dioxide" | "ozone" | "sulphur_dioxide" | "ammonia" | "dust" | "aerosol_optical_depth" | "carbon_dioxide" | "methane")[] | undefined;
|
|
125
|
+
timezone?: string | undefined;
|
|
126
|
+
past_days?: number | undefined;
|
|
127
|
+
forecast_days?: number | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
latitude: number;
|
|
130
|
+
longitude: number;
|
|
131
|
+
hourly?: ("pm10" | "pm2_5" | "carbon_monoxide" | "nitrogen_dioxide" | "ozone" | "sulphur_dioxide" | "ammonia" | "dust" | "aerosol_optical_depth" | "carbon_dioxide" | "methane")[] | undefined;
|
|
132
|
+
timeformat?: "iso8601" | "unixtime" | undefined;
|
|
133
|
+
timezone?: string | undefined;
|
|
134
|
+
past_days?: number | undefined;
|
|
135
|
+
forecast_days?: number | undefined;
|
|
136
|
+
}>;
|
|
137
|
+
export declare const MarineHourlyVariablesSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["wave_height", "wave_direction", "wave_period", "wind_wave_height", "wind_wave_direction", "wind_wave_period", "swell_wave_height", "swell_wave_direction", "swell_wave_period", "sea_surface_temperature"]>, "many">>;
|
|
138
|
+
export declare const MarineDailyVariablesSchema: z.ZodOptional<z.ZodArray<z.ZodEnum<["wave_height_max", "wind_wave_height_max", "swell_wave_height_max"]>, "many">>;
|
|
139
|
+
export declare const MarineParamsSchema: z.ZodObject<{
|
|
140
|
+
latitude: z.ZodNumber;
|
|
141
|
+
longitude: z.ZodNumber;
|
|
142
|
+
} & {
|
|
143
|
+
hourly: z.ZodOptional<z.ZodArray<z.ZodEnum<["wave_height", "wave_direction", "wave_period", "wind_wave_height", "wind_wave_direction", "wind_wave_period", "swell_wave_height", "swell_wave_direction", "swell_wave_period", "sea_surface_temperature"]>, "many">>;
|
|
144
|
+
daily: z.ZodOptional<z.ZodArray<z.ZodEnum<["wave_height_max", "wind_wave_height_max", "swell_wave_height_max"]>, "many">>;
|
|
145
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
146
|
+
timeformat: z.ZodDefault<z.ZodEnum<["iso8601", "unixtime"]>>;
|
|
147
|
+
past_days: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
forecast_days: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
latitude: number;
|
|
151
|
+
longitude: number;
|
|
152
|
+
timeformat: "iso8601" | "unixtime";
|
|
153
|
+
hourly?: ("wave_height" | "wave_direction" | "wave_period" | "wind_wave_height" | "wind_wave_direction" | "wind_wave_period" | "swell_wave_height" | "swell_wave_direction" | "swell_wave_period" | "sea_surface_temperature")[] | undefined;
|
|
154
|
+
daily?: ("wave_height_max" | "wind_wave_height_max" | "swell_wave_height_max")[] | undefined;
|
|
155
|
+
timezone?: string | undefined;
|
|
156
|
+
past_days?: number | undefined;
|
|
157
|
+
forecast_days?: number | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
latitude: number;
|
|
160
|
+
longitude: number;
|
|
161
|
+
hourly?: ("wave_height" | "wave_direction" | "wave_period" | "wind_wave_height" | "wind_wave_direction" | "wind_wave_period" | "swell_wave_height" | "swell_wave_direction" | "swell_wave_period" | "sea_surface_temperature")[] | undefined;
|
|
162
|
+
daily?: ("wave_height_max" | "wind_wave_height_max" | "swell_wave_height_max")[] | undefined;
|
|
163
|
+
timeformat?: "iso8601" | "unixtime" | undefined;
|
|
164
|
+
timezone?: string | undefined;
|
|
165
|
+
past_days?: number | undefined;
|
|
166
|
+
forecast_days?: number | undefined;
|
|
167
|
+
}>;
|
|
168
|
+
export declare const ElevationParamsSchema: z.ZodObject<{
|
|
169
|
+
latitude: z.ZodNumber;
|
|
170
|
+
longitude: z.ZodNumber;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
latitude: number;
|
|
173
|
+
longitude: number;
|
|
174
|
+
}, {
|
|
175
|
+
latitude: number;
|
|
176
|
+
longitude: number;
|
|
177
|
+
}>;
|
|
178
|
+
export declare const WeatherResponseSchema: z.ZodObject<{
|
|
179
|
+
latitude: z.ZodNumber;
|
|
180
|
+
longitude: z.ZodNumber;
|
|
181
|
+
elevation: z.ZodNumber;
|
|
182
|
+
generationtime_ms: z.ZodNumber;
|
|
183
|
+
utc_offset_seconds: z.ZodNumber;
|
|
184
|
+
hourly: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">>>;
|
|
185
|
+
hourly_units: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
186
|
+
daily: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">>>;
|
|
187
|
+
daily_units: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
188
|
+
current_weather: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
time: z.ZodString;
|
|
190
|
+
temperature: z.ZodNumber;
|
|
191
|
+
wind_speed: z.ZodNumber;
|
|
192
|
+
wind_direction: z.ZodNumber;
|
|
193
|
+
weather_code: z.ZodNumber;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
weather_code: number;
|
|
196
|
+
time: string;
|
|
197
|
+
temperature: number;
|
|
198
|
+
wind_speed: number;
|
|
199
|
+
wind_direction: number;
|
|
200
|
+
}, {
|
|
201
|
+
weather_code: number;
|
|
202
|
+
time: string;
|
|
203
|
+
temperature: number;
|
|
204
|
+
wind_speed: number;
|
|
205
|
+
wind_direction: number;
|
|
206
|
+
}>>;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
latitude: number;
|
|
209
|
+
longitude: number;
|
|
210
|
+
elevation: number;
|
|
211
|
+
generationtime_ms: number;
|
|
212
|
+
utc_offset_seconds: number;
|
|
213
|
+
hourly?: Record<string, (string | number)[]> | undefined;
|
|
214
|
+
daily?: Record<string, (string | number)[]> | undefined;
|
|
215
|
+
current_weather?: {
|
|
216
|
+
weather_code: number;
|
|
217
|
+
time: string;
|
|
218
|
+
temperature: number;
|
|
219
|
+
wind_speed: number;
|
|
220
|
+
wind_direction: number;
|
|
221
|
+
} | undefined;
|
|
222
|
+
hourly_units?: Record<string, string> | undefined;
|
|
223
|
+
daily_units?: Record<string, string> | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
latitude: number;
|
|
226
|
+
longitude: number;
|
|
227
|
+
elevation: number;
|
|
228
|
+
generationtime_ms: number;
|
|
229
|
+
utc_offset_seconds: number;
|
|
230
|
+
hourly?: Record<string, (string | number)[]> | undefined;
|
|
231
|
+
daily?: Record<string, (string | number)[]> | undefined;
|
|
232
|
+
current_weather?: {
|
|
233
|
+
weather_code: number;
|
|
234
|
+
time: string;
|
|
235
|
+
temperature: number;
|
|
236
|
+
wind_speed: number;
|
|
237
|
+
wind_direction: number;
|
|
238
|
+
} | undefined;
|
|
239
|
+
hourly_units?: Record<string, string> | undefined;
|
|
240
|
+
daily_units?: Record<string, string> | undefined;
|
|
241
|
+
}>;
|
|
242
|
+
export declare const ElevationResponseSchema: z.ZodObject<{
|
|
243
|
+
elevation: z.ZodArray<z.ZodNumber, "many">;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
elevation: number[];
|
|
246
|
+
}, {
|
|
247
|
+
elevation: number[];
|
|
248
|
+
}>;
|
|
249
|
+
export type ForecastParams = z.infer<typeof ForecastParamsSchema>;
|
|
250
|
+
export type ArchiveParams = z.infer<typeof ArchiveParamsSchema>;
|
|
251
|
+
export type AirQualityParams = z.infer<typeof AirQualityParamsSchema>;
|
|
252
|
+
export type MarineParams = z.infer<typeof MarineParamsSchema>;
|
|
253
|
+
export type ElevationParams = z.infer<typeof ElevationParamsSchema>;
|
|
254
|
+
export type WeatherResponse = z.infer<typeof WeatherResponseSchema>;
|
|
255
|
+
export type ElevationResponse = z.infer<typeof ElevationResponseSchema>;
|
|
256
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AAEH,eAAO,MAAM,qBAAqB,oDAAuD,CAAC;AAC1F,eAAO,MAAM,mBAAmB,qDAAoD,CAAC;AACrF,eAAO,MAAM,uBAAuB,yCAAuC,CAAC;AAC5E,eAAO,MAAM,gBAAgB,kDAAqD,CAAC;AAGnF,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AAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Base parameter schemas
|
|
3
|
+
export const CoordinateSchema = z.object({
|
|
4
|
+
latitude: z.number().min(-90).max(90),
|
|
5
|
+
longitude: z.number().min(-180).max(180),
|
|
6
|
+
});
|
|
7
|
+
export const TemperatureUnitSchema = z.enum(['celsius', 'fahrenheit']).default('celsius');
|
|
8
|
+
export const WindSpeedUnitSchema = z.enum(['kmh', 'ms', 'mph', 'kn']).default('kmh');
|
|
9
|
+
export const PrecipitationUnitSchema = z.enum(['mm', 'inch']).default('mm');
|
|
10
|
+
export const TimeFormatSchema = z.enum(['iso8601', 'unixtime']).default('iso8601');
|
|
11
|
+
// Weather variables schemas
|
|
12
|
+
export const HourlyVariablesSchema = z.array(z.enum([
|
|
13
|
+
// Temperature variables
|
|
14
|
+
'temperature_2m', 'relative_humidity_2m', 'dewpoint_2m', 'apparent_temperature', 'surface_temperature',
|
|
15
|
+
// Pressure variables
|
|
16
|
+
'pressure_msl', 'surface_pressure',
|
|
17
|
+
// Cloud variables
|
|
18
|
+
'cloud_cover', 'cloud_cover_low', 'cloud_cover_mid', 'cloud_cover_high',
|
|
19
|
+
// Wind variables
|
|
20
|
+
'wind_speed_10m', 'wind_speed_80m', 'wind_speed_120m', 'wind_speed_180m',
|
|
21
|
+
'wind_direction_10m', 'wind_direction_80m', 'wind_direction_120m', 'wind_direction_180m',
|
|
22
|
+
'wind_gusts_10m', 'wind_u_component_10m', 'wind_v_component_10m',
|
|
23
|
+
'wind_u_component_80m', 'wind_v_component_80m', 'wind_u_component_120m', 'wind_v_component_120m',
|
|
24
|
+
'wind_u_component_180m', 'wind_v_component_180m',
|
|
25
|
+
// Radiation variables
|
|
26
|
+
'shortwave_radiation', 'direct_radiation', 'direct_normal_irradiance', 'diffuse_radiation',
|
|
27
|
+
'terrestrial_radiation', 'sunshine_duration', 'uv_index', 'uv_index_clear_sky',
|
|
28
|
+
// Precipitation variables
|
|
29
|
+
'precipitation', 'rain', 'showers', 'snowfall', 'precipitation_probability', 'snow_depth', 'snow_height',
|
|
30
|
+
// Atmospheric variables
|
|
31
|
+
'vapour_pressure_deficit', 'et0_fao_evapotranspiration', 'weather_code', 'visibility', 'is_day',
|
|
32
|
+
'cape', 'lifted_index', 'convective_inhibition', 'freezing_level_height', 'boundary_layer_height',
|
|
33
|
+
'updraft_velocity', 'downdraft_velocity',
|
|
34
|
+
// Soil variables
|
|
35
|
+
'soil_temperature_0cm', 'soil_temperature_6cm', 'soil_temperature_18cm', 'soil_temperature_54cm',
|
|
36
|
+
'soil_moisture_0_1cm', 'soil_moisture_1_3cm', 'soil_moisture_3_9cm', 'soil_moisture_9_27cm',
|
|
37
|
+
'soil_moisture_27_81cm',
|
|
38
|
+
// Energy flux variables
|
|
39
|
+
'sensible_heat_flux', 'latent_heat_flux',
|
|
40
|
+
// Agricultural variables
|
|
41
|
+
'growing_degree_days_base_0_limit_30', 'leaf_wetness_probability', 'skin_temperature'
|
|
42
|
+
])).optional();
|
|
43
|
+
export const DailyVariablesSchema = z.array(z.enum([
|
|
44
|
+
'temperature_2m_max', 'temperature_2m_min', 'apparent_temperature_max', 'apparent_temperature_min',
|
|
45
|
+
'precipitation_sum', 'precipitation_hours', 'weather_code', 'sunrise', 'sunset',
|
|
46
|
+
'wind_speed_10m_max', 'wind_gusts_10m_max', 'wind_direction_10m_dominant',
|
|
47
|
+
'shortwave_radiation_sum', 'uv_index_max', 'uv_index_clear_sky_max', 'et0_fao_evapotranspiration'
|
|
48
|
+
])).optional();
|
|
49
|
+
export const WeatherModelsSchema = z.array(z.enum([
|
|
50
|
+
'meteofrance_arome_france_hd', 'meteofrance_arome_france', 'meteofrance_arpege_europe',
|
|
51
|
+
'icon_eu', 'icon_global', 'ecmwf_ifs025', 'gfs013'
|
|
52
|
+
])).optional();
|
|
53
|
+
// Forecast parameters schema
|
|
54
|
+
export const ForecastParamsSchema = CoordinateSchema.extend({
|
|
55
|
+
hourly: HourlyVariablesSchema,
|
|
56
|
+
daily: DailyVariablesSchema,
|
|
57
|
+
current_weather: z.boolean().optional(),
|
|
58
|
+
temperature_unit: TemperatureUnitSchema,
|
|
59
|
+
wind_speed_unit: WindSpeedUnitSchema,
|
|
60
|
+
precipitation_unit: PrecipitationUnitSchema,
|
|
61
|
+
timeformat: TimeFormatSchema,
|
|
62
|
+
timezone: z.string().optional(),
|
|
63
|
+
past_days: z.union([z.literal(1), z.literal(2)]).optional(),
|
|
64
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
65
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
66
|
+
start_hour: z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/).optional(),
|
|
67
|
+
end_hour: z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/).optional(),
|
|
68
|
+
models: WeatherModelsSchema,
|
|
69
|
+
});
|
|
70
|
+
// Archive parameters schema
|
|
71
|
+
export const ArchiveParamsSchema = CoordinateSchema.extend({
|
|
72
|
+
hourly: HourlyVariablesSchema,
|
|
73
|
+
daily: DailyVariablesSchema,
|
|
74
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
75
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
76
|
+
temperature_unit: TemperatureUnitSchema,
|
|
77
|
+
wind_speed_unit: WindSpeedUnitSchema,
|
|
78
|
+
precipitation_unit: PrecipitationUnitSchema,
|
|
79
|
+
timeformat: TimeFormatSchema,
|
|
80
|
+
timezone: z.string().optional(),
|
|
81
|
+
});
|
|
82
|
+
// Air quality variables
|
|
83
|
+
export const AirQualityVariablesSchema = z.array(z.enum([
|
|
84
|
+
'pm10', 'pm2_5', 'carbon_monoxide', 'nitrogen_dioxide', 'ozone',
|
|
85
|
+
'sulphur_dioxide', 'ammonia', 'dust', 'aerosol_optical_depth',
|
|
86
|
+
'carbon_dioxide', 'methane'
|
|
87
|
+
])).optional();
|
|
88
|
+
export const AirQualityParamsSchema = CoordinateSchema.extend({
|
|
89
|
+
hourly: AirQualityVariablesSchema,
|
|
90
|
+
timezone: z.string().optional(),
|
|
91
|
+
timeformat: TimeFormatSchema,
|
|
92
|
+
past_days: z.number().min(1).max(7).optional(),
|
|
93
|
+
forecast_days: z.number().min(1).max(16).optional(),
|
|
94
|
+
});
|
|
95
|
+
// Marine variables
|
|
96
|
+
export const MarineHourlyVariablesSchema = z.array(z.enum([
|
|
97
|
+
'wave_height', 'wave_direction', 'wave_period',
|
|
98
|
+
'wind_wave_height', 'wind_wave_direction', 'wind_wave_period',
|
|
99
|
+
'swell_wave_height', 'swell_wave_direction', 'swell_wave_period',
|
|
100
|
+
'sea_surface_temperature'
|
|
101
|
+
])).optional();
|
|
102
|
+
export const MarineDailyVariablesSchema = z.array(z.enum([
|
|
103
|
+
'wave_height_max', 'wind_wave_height_max', 'swell_wave_height_max'
|
|
104
|
+
])).optional();
|
|
105
|
+
export const MarineParamsSchema = CoordinateSchema.extend({
|
|
106
|
+
hourly: MarineHourlyVariablesSchema,
|
|
107
|
+
daily: MarineDailyVariablesSchema,
|
|
108
|
+
timezone: z.string().optional(),
|
|
109
|
+
timeformat: TimeFormatSchema,
|
|
110
|
+
past_days: z.number().min(1).max(7).optional(),
|
|
111
|
+
forecast_days: z.number().min(1).max(16).optional(),
|
|
112
|
+
});
|
|
113
|
+
// Elevation parameters
|
|
114
|
+
export const ElevationParamsSchema = CoordinateSchema;
|
|
115
|
+
// Response types
|
|
116
|
+
export const WeatherResponseSchema = z.object({
|
|
117
|
+
latitude: z.number(),
|
|
118
|
+
longitude: z.number(),
|
|
119
|
+
elevation: z.number(),
|
|
120
|
+
generationtime_ms: z.number(),
|
|
121
|
+
utc_offset_seconds: z.number(),
|
|
122
|
+
hourly: z.record(z.array(z.union([z.number(), z.string()]))).optional(),
|
|
123
|
+
hourly_units: z.record(z.string()).optional(),
|
|
124
|
+
daily: z.record(z.array(z.union([z.number(), z.string()]))).optional(),
|
|
125
|
+
daily_units: z.record(z.string()).optional(),
|
|
126
|
+
current_weather: z.object({
|
|
127
|
+
time: z.string(),
|
|
128
|
+
temperature: z.number(),
|
|
129
|
+
wind_speed: z.number(),
|
|
130
|
+
wind_direction: z.number(),
|
|
131
|
+
weather_code: z.number(),
|
|
132
|
+
}).optional(),
|
|
133
|
+
});
|
|
134
|
+
export const ElevationResponseSchema = z.object({
|
|
135
|
+
elevation: z.array(z.number()),
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAyB;AACzB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC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E;IAC5C,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;KACzB,CAAC,CAAC,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC/B,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "open-meteo-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol server for Open-Meteo weather APIs",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js",
|
|
10
|
+
"dev": "tsx src/index.ts",
|
|
11
|
+
"test": "vitest",
|
|
12
|
+
"lint": "eslint src/**/*.ts",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"release": "npm run build && npm run test && npm run lint",
|
|
15
|
+
"release:patch": "npm version patch && git push origin main --tags",
|
|
16
|
+
"release:minor": "npm version minor && git push origin main --tags",
|
|
17
|
+
"release:major": "npm version major && git push origin main --tags"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"mcp",
|
|
21
|
+
"weather",
|
|
22
|
+
"open-meteo",
|
|
23
|
+
"forecast",
|
|
24
|
+
"api"
|
|
25
|
+
],
|
|
26
|
+
"author": "Claude Code",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/cmer81/open-meteo-mcp.git"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/cmer81/open-meteo-mcp/issues"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/cmer81/open-meteo-mcp#readme",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/**/*",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
43
|
+
"axios": "^1.6.0",
|
|
44
|
+
"zod": "^3.22.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^20.0.0",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
49
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
50
|
+
"eslint": "^8.0.0",
|
|
51
|
+
"tsx": "^4.0.0",
|
|
52
|
+
"typescript": "^5.0.0",
|
|
53
|
+
"vitest": "^1.0.0"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|