aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/types/models/account/account-blocklist.ts
blob: 0d8bf11bd98b5838f5aab96af8896f5efa53b892 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                                                 
                                                                
 



                                                                                          

                                                                                           

                                                                               

                                                                   

                                       

                                        




                                                                               

                                          

                                            
import { AccountBlocklistModel } from '../../../models/account/account-blocklist'
import { PickWith } from '../../utils'
import { MAccountDefault, MAccountFormattable } from './account'

type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M>

// ############################################################################

export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'>

// ############################################################################

export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'>

export type MAccountBlocklistAccounts =
  MAccountBlocklist &
  Use<'ByAccount', MAccountDefault> &
  Use<'BlockedAccount', MAccountDefault>

// ############################################################################

// Format for API or AP object

export type MAccountBlocklistFormattable =
  Pick<MAccountBlocklist, 'createdAt'> &
  Use<'ByAccount', MAccountFormattable> &
  Use<'BlockedAccount', MAccountFormattable>