Files
wtr/types/notifications.ts
zv 91acdb39b8
Some checks failed
CI / Lint, test, typecheck and build (push) Has been cancelled
feat: add weather unit preferences
2026-07-04 20:16:11 +02:00

39 lines
1.1 KiB
TypeScript

import type { Language } from "@/lib/i18n";
import type { Province } from "@/types/province";
import type { DistanceUnit, PrecipitationUnit, PressureUnit, TemperatureUnit, WindSpeedUnit } from "@/types/units";
import type { WeatherRegion } from "@/types/weather-region";
export interface PushSubscriptionKeys {
p256dh: string;
auth: string;
}
export interface BrowserPushSubscription {
endpoint: string;
expirationTime?: number | null;
keys: PushSubscriptionKeys;
}
export interface WarningPushSubscription {
endpoint: string;
subscription: BrowserPushSubscription;
province: Province | null;
region: WeatherRegion;
language: Language;
enabled: boolean;
morningBriefEnabled: boolean;
tomorrowBriefEnabled: boolean;
latitude: number | null;
longitude: number | null;
locationName: string | null;
timezone: string | null;
countyTeryt: string | null;
temperatureUnit: TemperatureUnit;
windSpeedUnit: WindSpeedUnit;
precipitationUnit: PrecipitationUnit;
pressureUnit: PressureUnit;
distanceUnit: DistanceUnit;
createdAt: string;
updatedAt: string;
}