UNPKG

fruit-company

Version:
37 lines (36 loc) 1.69 kB
import { SereneRequest, SereneRequestParseOptions, SereneRequestPrepareOptions } from "serene-front"; import { LocationCoordinates } from "serene-front/data"; import { Attribution } from "./models"; import { Weather } from "./models/weather"; import { WeatherToken } from "./token"; export type WeatherDataSet = "currentWeather" | "forecastDaily" | "forecastHourly" | "forecastNextHour" | "weatherAlerts"; export declare const allWeatherDataSets: readonly WeatherDataSet[]; export interface WeatherQueryOptions { readonly language: string; readonly location: LocationCoordinates; readonly timezone: string; readonly countryCode?: string; readonly currentAsOf?: Date; readonly dailyEnd?: Date; readonly dailyStart?: Date; readonly dataSets?: readonly WeatherDataSet[]; readonly hourlyEnd?: Date; readonly hourlyStart?: Date; } export declare class WeatherQuery implements SereneRequest<WeatherToken, Weather> { readonly options: WeatherQueryOptions; constructor(options: WeatherQueryOptions); prepare({}: SereneRequestPrepareOptions<WeatherToken>): Request; parse({ fetchResponse }: SereneRequestParseOptions<WeatherToken>): Promise<Weather>; toString(): string; } export interface WeatherAttributionOptions { readonly language: string; } export declare class WeatherAttribution implements SereneRequest<WeatherToken, Attribution> { readonly options: WeatherAttributionOptions; constructor(options: WeatherAttributionOptions); prepare({}: SereneRequestPrepareOptions<WeatherToken>): Request; parse({ fetchResponse }: SereneRequestParseOptions<WeatherToken>): Promise<Attribution>; toString(): string; }