]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/types/models/server/server-blocklist.ts
Add retries to all webtorrent tests
[github/Chocobozzz/PeerTube.git] / server / types / models / server / server-blocklist.ts
CommitLineData
453e83ea 1import { ServerBlocklistModel } from '@server/models/server/server-blocklist'
6b5f72be 2import { PickWith } from '@shared/typescript-utils'
d7a25329
C
3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MServer, MServerFormattable } from './server'
453e83ea 5
0283eaac
C
6type Use<K extends keyof ServerBlocklistModel, M> = PickWith<ServerBlocklistModel, K, M>
7
8// ############################################################################
9
453e83ea
C
10export type MServerBlocklist = Omit<ServerBlocklistModel, 'ByAccount' | 'BlockedServer'>
11
0283eaac
C
12// ############################################################################
13
a1587156
C
14export type MServerBlocklistAccountServer =
15 MServerBlocklist &
0283eaac
C
16 Use<'ByAccount', MAccountDefault> &
17 Use<'BlockedServer', MServer>
1ca9f7c3
C
18
19// ############################################################################
20
21// Format for API or AP object
22
a1587156
C
23export type MServerBlocklistFormattable =
24 Pick<MServerBlocklist, 'createdAt'> &
1ca9f7c3
C
25 Use<'ByAccount', MAccountFormattable> &
26 Use<'BlockedServer', MServerFormattable>