UNPKG

@bashcat/cwa-mcp-weather

Version:

MCP 伺服器整合中央氣象署 (CWA) 開放資料 API - 完整支援所有15個天氣工具

201 lines 5.19 kB
export interface CWAAPIConfig { baseUrl: string; apiKey: string; } export interface CWALocation { name: string; geocode: string; } export interface CWAWeatherElement { elementName: string; time: Array<{ startTime: string; endTime: string; parameter: { parameterName: string; parameterValue?: string; parameterUnit?: string; }; }>; } export interface CWAWeatherData { success: string; result: { resource_id: string; fields: Array<{ id: string; type: string; }>; }; records: { datasetDescription: string; location: Array<{ locationName: string; geocode?: string; lat?: string; lon?: string; weatherElement: CWAWeatherElement[]; }>; }; } export interface CWAObservationData { success: string; result: { resource_id: string; fields: Array<{ id: string; type: string; }>; }; records: { location: Array<{ locationName: string; stationId?: string; time?: { obsTime: string; }; weatherElement: Array<{ elementName: string; elementValue: string; }>; }>; }; } export interface CWAEarthquakeData { success: string; result: { resource_id: string; fields: Array<{ id: string; type: string; }>; }; records: { earthquake: Array<{ earthquakeNo: string; reportType: string; reportColor: string; reportRemark: string; web: string; shakemapImageURI: string; reportImageURI: string; location: string; depth: string; magnitude: string; originTime: string; source: string; }>; }; } export interface CWAWarningData { success: string; result: { resource_id: string; fields: Array<{ id: string; type: string; }>; }; records: { record: Array<{ datasetDescription: string; locationName?: string; hazardConditions?: { hazards: Array<{ info: string; phenomena: string; significance: string; }>; }; validTime?: { startTime: string; endTime: string; }; contents?: { contentText: string; }; }>; }; } export declare const TAIWAN_COUNTIES: string[]; export declare const WEATHER_ELEMENTS: { GENERAL: { Wx: string; PoP: string; CI: string; MinT: string; MaxT: string; }; TOWNSHIP_3DAY: { 露點溫度: string; 天氣預報綜合描述: string; 舒適度指數: string; 風向: string; 降雨機率: string; 溫度: string; 風速: string; 天氣現象: string; 相對濕度: string; 體感溫度: string; }; TOWNSHIP_WEEKLY: { 最高溫度: string; 天氣預報綜合描述: string; 平均相對濕度: string; 最高體感溫度: string; 降雨機率: string; 風向: string; 平均露點溫度: string; 最低體感溫度: string; 平均溫度: string; 最大舒適度指數: string; 最小舒適度指數: string; 風速: string; 紫外線指數: string; 天氣現象: string; 最低溫度: string; }; OBSERVATION: { ELEV: string; WDIR: string; WDSD: string; TEMP: string; HUMD: string; PRES: string; SUN: string; H_24R: string; H_FX: string; H_XD: string; H_FXT: string; D_TX: string; D_TXT: string; D_TN: string; D_TNT: string; }; }; export interface CWAAPIEndpoint { id: string; path: string; name: string; description: string; county?: string; period?: '3days' | 'weekly'; type: 'general' | 'township' | 'observation' | 'earthquake' | 'climate' | 'warning' | 'numerical' | 'astronomy'; category: 'forecast' | 'observation' | 'earthquake_tsunami' | 'climate' | 'warning' | 'numerical' | 'astronomy'; } export declare const CWA_API_ENDPOINTS: CWAAPIEndpoint[]; export declare const COUNTY_API_MAPPING: Record<string, { threeDays: string; weekly: string; }>; export declare const API_CATEGORIES: { readonly FORECAST: "forecast"; readonly OBSERVATION: "observation"; readonly EARTHQUAKE_TSUNAMI: "earthquake_tsunami"; readonly CLIMATE: "climate"; readonly WARNING: "warning"; readonly NUMERICAL: "numerical"; readonly ASTRONOMY: "astronomy"; }; export type APICategory = typeof API_CATEGORIES[keyof typeof API_CATEGORIES]; //# sourceMappingURL=types.d.ts.map