]>
Commit | Line | Data |
---|---|---|
453e83ea | 1 | import { ServerModel } from '../../../models/server/server' |
1ca9f7c3 | 2 | import { FunctionProperties, PickWith } from '../../utils' |
453e83ea C |
3 | import { MAccountBlocklistId } from '../account' |
4 | ||
0283eaac C |
5 | type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M> |
6 | ||
7 | // ############################################################################ | |
8 | ||
453e83ea C |
9 | export type MServer = Omit<ServerModel, 'Actors' | 'BlockedByAccounts'> |
10 | ||
0283eaac C |
11 | // ############################################################################ |
12 | ||
453e83ea | 13 | export type MServerHost = Pick<MServer, 'host'> |
1ca9f7c3 | 14 | export type MServerRedundancyAllowed = Pick<MServer, 'redundancyAllowed'> |
453e83ea C |
15 | |
16 | export type MServerHostBlocks = MServerHost & | |
0283eaac | 17 | Use<'BlockedByAccounts', MAccountBlocklistId[]> |
1ca9f7c3 C |
18 | |
19 | // ############################################################################ | |
20 | ||
21 | // Format for API or AP object | |
22 | ||
23 | export type MServerFormattable = FunctionProperties<MServer> & | |
24 | Pick<MServer, 'host'> |