]>
Commit | Line | Data |
---|---|---|
1 | import { AccountBlocklistModel } from '../../../models/account/account-blocklist' | |
2 | import { PickWith } from '../../utils' | |
3 | import { MAccountDefault, MAccountFormattable } from './account' | |
4 | ||
5 | type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M> | |
6 | ||
7 | // ############################################################################ | |
8 | ||
9 | export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'> | |
10 | ||
11 | // ############################################################################ | |
12 | ||
13 | export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'> | |
14 | ||
15 | export type MAccountBlocklistAccounts = MAccountBlocklist & | |
16 | Use<'ByAccount', MAccountDefault> & | |
17 | Use<'BlockedAccount', MAccountDefault> | |
18 | ||
19 | // ############################################################################ | |
20 | ||
21 | // Format for API or AP object | |
22 | ||
23 | export type MAccountBlocklistFormattable = Pick<MAccountBlocklist, 'createdAt'> & | |
24 | Use<'ByAccount', MAccountFormattable> & | |
25 | Use<'BlockedAccount', MAccountFormattable> |