import type { ComponentDefinition } from '@json-to-office/shared-docx'; /** * The reference example for a plugin that calls a real API. * * Weather comes from Open-Meteo (https://open-meteo.com) — free, no key, no * attribution requirement — over two endpoints: a geocoding search that turns * a city name into coordinates, then the forecast itself. Everything it needs * is in the two hosts below, which is the point of the example: a plugin * should be able to name what it talks to. * * In the playground this runs inside the browser sandbox, so both hosts have * to be listed against the plugin's Network switch before either call is * allowed. On disk it runs in Node, where `fetch` is global from 18 on. */ /** The hosts this component calls. Paste these into its Network allowlist. */ export declare const WEATHER_API_HOSTS: readonly ["https://geocoding-api.open-meteo.com", "https://api.open-meteo.com"]; export declare class WeatherLookupError extends Error { constructor(message: string); } export interface CurrentWeather { temperature: number; apparent: number; conditions: string; humidity: number; windSpeed: number; pressure: number; observedAt: string; } export interface ForecastDay { date: string; high: number; low: number; conditions: string; precipitation: number; } /** * Live weather, from Open-Meteo. * * @example * ```json * { * "name": "weather", * "props": { "city": "Milan", "units": "metric", "showDetails": true } * } * ``` */ export declare const weatherComponent: import("@json-to-office/core-docx").CustomComponent, import("@sinclair/typebox").TLiteral<"imperial">]>>; showDetails: import("@sinclair/typebox").TOptional; }>>; '2.0.0': import("@json-to-office/core-docx").ComponentVersion<{ name: "heading"; props: { level: 3; text: string; columns?: undefined; font?: undefined; }; } | { name: "table"; props: { columns: { header: { content: string; }; cells: { content: string; }[]; }[]; level?: undefined; text?: undefined; font?: undefined; }; } | { name: "paragraph"; props: { text: string; font: { size: number; italic: true; }; level?: undefined; columns?: undefined; }; }, import("@sinclair/typebox").TObject<{ city: import("@sinclair/typebox").TString; units: import("@sinclair/typebox").TOptional, import("@sinclair/typebox").TLiteral<"imperial">]>>; days: import("@sinclair/typebox").TOptional; }>>; }, "weather">; //# sourceMappingURL=weather.component.d.ts.map