mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 12:19:08 +01:00
27 lines
871 B
TypeScript
27 lines
871 B
TypeScript
import type { Emoji, PushSubscription as MastoPushSubscription, PushSubscriptionAlerts, SubscriptionPolicy } from 'masto'
|
|
|
|
import type { UserLogin } from '~/types'
|
|
|
|
export type SubscriptionResult = 'subscribed' | 'notification-denied' | 'invalid-state'
|
|
export interface PushManagerSubscriptionInfo {
|
|
registration: ServiceWorkerRegistration
|
|
subscription: PushSubscription | null
|
|
}
|
|
|
|
export interface RequiredUserLogin extends Required<Omit<UserLogin, 'account' | 'pushSubscription'>> {
|
|
pushSubscription?: MastoPushSubscription
|
|
}
|
|
|
|
export interface CreatePushNotification {
|
|
alerts?: Partial<PushSubscriptionAlerts> | null
|
|
policy?: SubscriptionPolicy
|
|
}
|
|
|
|
export type PushNotificationRequest = Record<string, boolean>
|
|
export type PushNotificationPolicy = Record<string, SubscriptionPolicy>
|
|
|
|
export interface CustomEmojisInfo {
|
|
lastUpdate: number
|
|
emojis: Emoji[]
|
|
}
|