]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/types/models/server/server.ts
Add video file size info in admin videos list
[github/Chocobozzz/PeerTube.git] / server / types / models / server / server.ts
CommitLineData
453e83ea 1import { ServerModel } from '../../../models/server/server'
67ed6552 2import { FunctionProperties, PickWith } from '@shared/core-utils'
453e83ea
C
3import { MAccountBlocklistId } from '../account'
4
0283eaac
C
5type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M>
6
7// ############################################################################
8
453e83ea
C
9export type MServer = Omit<ServerModel, 'Actors' | 'BlockedByAccounts'>
10
0283eaac
C
11// ############################################################################
12
453e83ea 13export type MServerHost = Pick<MServer, 'host'>
1ca9f7c3 14export type MServerRedundancyAllowed = Pick<MServer, 'redundancyAllowed'>
453e83ea 15
a1587156
C
16export type MServerHostBlocks =
17 MServerHost &
3c10840f 18 Use<'BlockedBy', MAccountBlocklistId[]>
1ca9f7c3
C
19
20// ############################################################################
21
22// Format for API or AP object
23
a1587156
C
24export type MServerFormattable =
25 FunctionProperties<MServer> &
1ca9f7c3 26 Pick<MServer, 'host'>