Add Web Push warning notification backend
This commit is contained in:
23
types/notifications.ts
Normal file
23
types/notifications.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Language } from "@/lib/i18n";
|
||||
import type { Province } from "@/types/province";
|
||||
|
||||
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;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
Reference in New Issue
Block a user