]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - 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
1import { ServerModel } from '../../../models/server/server'
2import { FunctionProperties, PickWith } from '@shared/core-utils'
3import { MAccountBlocklistId } from '../account'
4
5type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M>
6
7// ############################################################################
8
9export type MServer = Omit<ServerModel, 'Actors' | 'BlockedByAccounts'>
10
11// ############################################################################
12
13export type MServerHost = Pick<MServer, 'host'>
14export type MServerRedundancyAllowed = Pick<MServer, 'redundancyAllowed'>
15
16export type MServerHostBlocks =
17 MServerHost &
18 Use<'BlockedBy', MAccountBlocklistId[]>
19
20// ############################################################################
21
22// Format for API or AP object
23
24export type MServerFormattable =
25 FunctionProperties<MServer> &
26 Pick<MServer, 'host'>