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