]>
Commit | Line | Data |
---|---|---|
1 | import { AccountBlocklistModel } from '../../../models/account/account-blocklist' | |
2 | import { PickWith } from '@shared/core-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 = | |
16 | MAccountBlocklist & | |
17 | Use<'ByAccount', MAccountDefault> & | |
18 | Use<'BlockedAccount', MAccountDefault> | |
19 | ||
20 | // ############################################################################ | |
21 | ||
22 | // Format for API or AP object | |
23 | ||
24 | export type MAccountBlocklistFormattable = | |
25 | Pick<MAccountBlocklist, 'createdAt'> & | |
26 | Use<'ByAccount', MAccountFormattable> & | |
27 | Use<'BlockedAccount', MAccountFormattable> |