blob: 801f179fd7cd6640c473fb6c65ac51abb04b67fa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import { ServerBlocklistModel } from '@server/models/server/server-blocklist'
import { PickWith } from '@shared/core-utils'
import { MAccountDefault, MAccountFormattable } from '../account/account'
import { MServer, MServerFormattable } from './server'
type Use<K extends keyof ServerBlocklistModel, M> = PickWith<ServerBlocklistModel, K, M>
// ############################################################################
export type MServerBlocklist = Omit<ServerBlocklistModel, 'ByAccount' | 'BlockedServer'>
// ############################################################################
export type MServerBlocklistAccountServer =
MServerBlocklist &
Use<'ByAccount', MAccountDefault> &
Use<'BlockedServer', MServer>
// ############################################################################
// Format for API or AP object
export type MServerBlocklistFormattable =
Pick<MServerBlocklist, 'createdAt'> &
Use<'ByAccount', MAccountFormattable> &
Use<'BlockedServer', MServerFormattable>
|