UNPKG

nina-api

Version:

113 lines (110 loc) 3.7 kB
interface NinaDashboardItem { id: string; payload: { version: number; type: string; id: string; hash: string; data: { headline: string; provider: string; severity: string; msgType: string; transKeys: { event: string; }; area: { type: string; data: string; }; }; }; i18nTitle: Record<string, string>; sent: Record<string, unknown>; } interface MapData { id: string; version: number; startDate: string; expiresDate: string; severity: string; urgency: string; type: string; i18nTitle: Record<string, string>; transKeys?: { event?: string; }; } interface Warning { identifier: string; sender: string; sent: string; status: 'Actual' | string; msgType: 'Update' | string; scope: 'Public' | string; code: string[] | string; references: string; info: { language: string; category: string[]; event: 'Flood' | string; responseType: []; urgency: 'Immediate' | string; severity: 'Moderate' | string; certainty: 'Observed' | string; effective: string; onset: string; senderName: string; headline: string; description: string; web: string; contact: string; parameter: []; area: []; }[]; } declare class Nina { /** * Retrieves the dashboard data for a given ARS. * @param ars - The ARS (Amtlicher Regional Schlüssel). * @see https://www.xrepository.de/api/xrepository/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs_2021-07-31/download/Regionalschl_ssel_2021-07-31.json * @returns A promise that resolves to an array of NinaDashboardItem objects, or undefined if the request fails. */ getDashboard(ars: string): Promise<NinaDashboardItem[] | undefined>; /** * Retrieves the map data for the Katwarn service. * @returns A promise that resolves to an unknown object, or undefined if the request fails. */ getKatwarnMapData(): Promise<unknown>; /** * Retrieves the map data for the Biwapp service. * @returns A promise that resolves to an array of MapData objects, or undefined if the request fails. */ getBiwappMapData(): Promise<MapData[] | undefined>; /** * Retrieves the map data for the Mowas service. * @returns A promise that resolves to an array of MapData objects, or undefined if the request fails. */ getMowasMapData(): Promise<MapData[] | undefined>; /** * Retrieves the map data for the DWD (Deutscher Wetterdienst) service. * @returns A promise that resolves to an array of MapData objects, or undefined if the request fails. */ getDwdMapData(): Promise<MapData[] | undefined>; /** * Retrieves the map data for the LHP (Länderübergreifende Hochwasserportal) service. * @returns A promise that resolves to an array of MapData objects, or undefined if the request fails. */ getLhpMapData(): Promise<MapData[] | undefined>; /** * Retrieves the map data for the Police Information service. * @returns A promise that resolves to an array of MapData objects, or undefined if the request fails. */ getPoliceMapData(): Promise<MapData[] | undefined>; /** * Retrieves a specific warning by its ID. * @returns A promise that resolves to a Warning object, or undefined if the request fails. */ getWarning(id: string): Promise<Warning | undefined>; } export { Nina as default };