Files
wtr/types/notifications.ts
2026-06-13 13:36:36 +02:00

32 lines
779 B
TypeScript

import type { Language } from "@/lib/i18n";
import type { Province } from "@/types/province";
import type { WindSpeedUnit } from "@/types/units";
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;
language: Language;
enabled: boolean;
morningBriefEnabled: boolean;
tomorrowBriefEnabled: boolean;
latitude: number | null;
longitude: number | null;
locationName: string | null;
countyTeryt: string | null;
windSpeedUnit: WindSpeedUnit;
createdAt: string;
updatedAt: string;
}