aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/moderation/abuse-message.ts
blob: 565eca7066afa61ead4722dd4ce7f060c9f135e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
import { PickWith } from '@shared/core-utils'
import { AbuseModel } from '../../../models/abuse/abuse'
import { MAccountFormattable } from '../account'

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

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

export type MAbuseMessage = Omit<AbuseMessageModel, 'Account' | 'Abuse' | 'toFormattedJSON'>

export type MAbuseMessageId = Pick<AbuseModel, 'id'>

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

// Format for API

export type MAbuseMessageFormattable =
  MAbuseMessage &
  Use<'Account', MAccountFormattable>