From 26d6bf6533023326fa017812cf31bbe20c752d36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 10:45:25 +0200 Subject: Split types and typings --- server/types/models/account/account-blocklist.ts | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 server/types/models/account/account-blocklist.ts (limited to 'server/types/models/account/account-blocklist.ts') diff --git a/server/types/models/account/account-blocklist.ts b/server/types/models/account/account-blocklist.ts new file mode 100644 index 000000000..0d8bf11bd --- /dev/null +++ b/server/types/models/account/account-blocklist.ts @@ -0,0 +1,27 @@ +import { AccountBlocklistModel } from '../../../models/account/account-blocklist' +import { PickWith } from '../../utils' +import { MAccountDefault, MAccountFormattable } from './account' + +type Use = PickWith + +// ############################################################################ + +export type MAccountBlocklist = Omit + +// ############################################################################ + +export type MAccountBlocklistId = Pick + +export type MAccountBlocklistAccounts = + MAccountBlocklist & + Use<'ByAccount', MAccountDefault> & + Use<'BlockedAccount', MAccountDefault> + +// ############################################################################ + +// Format for API or AP object + +export type MAccountBlocklistFormattable = + Pick & + Use<'ByAccount', MAccountFormattable> & + Use<'BlockedAccount', MAccountFormattable> -- cgit v1.2.3