1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Continue to improve #535

This commit is contained in:
xmflsct
2022-12-12 23:57:07 +01:00
parent 17d4245cd9
commit 6e8515d820
6 changed files with 134 additions and 42 deletions

View File

@@ -333,24 +333,34 @@ declare namespace Mastodon {
url: string
}
type Notification = {
// Base
id: string
type:
| 'follow'
| 'follow_request'
| 'mention'
| 'reblog'
| 'favourite'
| 'poll'
| 'status'
| 'update'
created_at: string
account: Account
// Others
status?: Status
}
type Notification =
| {
// Base
id: string
type: 'favourite' | 'mention' | 'poll' | 'reblog' | 'status' | 'update'
created_at: string
account: Account
status: Status
report: undefined
}
| {
// Base
id: string
type: 'follow' | 'follow_request' | 'admin.sign_up'
created_at: string
account: Account
status: undefined
report: undefined
}
| {
// Base
id: string
type: 'admin.report'
created_at: string
account: Account
status: undefined
report: Report
}
type Poll = {
// Base
@@ -406,6 +416,19 @@ declare namespace Mastodon {
note: string
}
type Report = {
id: string
action_taken: boolean
action_taken_at?: string
category: 'spam' | 'violation' | 'other'
comment: string
forwarded: boolean
created_at: string
status_ids?: string[]
rule_ids?: string[]
target_account: Account
}
type Results = {
accounts?: Account[]
statuses?: Status[]