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