forked from elk-zone/elk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
72 lines (60 loc) · 1.74 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import type { mastodon } from 'masto'
import type { MarkNonNullable, Mutable } from './utils'
export interface AppInfo {
id: string
name: string
website: string | null
redirect_uri: string
client_id: string
client_secret: string
vapid_key: string
}
export interface UserLogin {
server: string
token?: string
account: mastodon.v1.AccountCredentials
vapidKey?: string
pushSubscription?: mastodon.v1.WebPushSubscription
}
export type PaginatorState = 'idle' | 'loading' | 'done' | 'error'
export interface GroupedNotifications {
id: string
type: 'grouped-follow'
items: mastodon.v1.Notification[]
}
export interface GroupedAccountLike {
account: mastodon.v1.Account
favourite?: mastodon.v1.Notification
reblog?: mastodon.v1.Notification
}
export interface GroupedLikeNotifications {
id: string
type: 'grouped-reblogs-and-favourites'
status: mastodon.v1.Status
likes: GroupedAccountLike[]
}
export type NotificationSlot = GroupedNotifications | GroupedLikeNotifications | mastodon.v1.Notification
export type TranslateFn = ReturnType<typeof useI18n>['t']
export interface Draft {
editingStatus?: mastodon.v1.Status
initialText?: string
params: MarkNonNullable<Mutable<mastodon.v1.CreateStatusParams>, 'status' | 'language' | 'sensitive' | 'spoilerText' | 'visibility'>
attachments: mastodon.v1.MediaAttachment[]
lastUpdated: number
mentions?: string[]
}
export type DraftMap = Record<string, Draft>
export interface ConfirmDialogLabel {
title: string
description?: string
confirm?: string
cancel?: string
}
export type ConfirmDialogChoice = 'confirm' | 'cancel'
export interface BuildInfo {
version: string
commit: string
time: number
branch: string
env: 'preview' | 'canary' | 'dev' | 'release'
}